Skip to main content

A simple coordinate geometry helper package

Project description

ci-cd codecov Documentation Status

coordgeompy

A simple coordinate geometry helper package. This package is developed for the UBC MDS DSCI 524 Collaborative Software Development course at the University of British Columbia.

Overview

This starter package allows users to perform various geometric operations like calculate distance between two parallel lines, distance between two n dimensional vectors, intersection of lines in 3-Dimensional space and so on. Our motivation in creating this package was to allow users with minimal experience in python coding to be able to perform these geometric calculations easily.

Installation

$ pip install git+https://github.com/UBC-MDS/CoordGeomPy.git@v1.0.0

Features

There are four main functions planned for development as outlined below. Additional functions may be added in the future.

Function 1 dist_pll_lines_2d: This function allows a user to calculate the distance between two parallel lines. This is the distance between the points where a perpendicular line intersects between the two parallel lines. This function will find that distance (d).

Function 2 get_distance: This function allows a user to calculate the the distance between two n dimensional vectors. Possible metrics that can be used with this function includes: Euclidean, Manhattan, Chebyshev, or Minkowski

Function 3 is_intersection_3d: This function allows a user to determine whether two infinite lines intersect in 3-dimensional space. The function will return True or False based on the input arguments.

Function 4 is_orthogonal: This function allows a user to determine whether two infinite lines are perpendicular in n-dimensional space. The function will return True or False based on the input arguments.

While we are not really reinventing the wheel on coordinate geometry calculations with our package, we used this as an opportunity to gain some experience in understanding how these calculations function in python language. There are existing packages that execute similar functions. For example, SymPy is a Python library that contains comprehensive mathematical functions including intersection of lines, shortest distance between a point and a line etc. We also found a package coordinate-geometry 1.0.02 that had similar functions to calculating distance between two points, a point and a line, area of a triangle etc. Scipy's scipy.spatial.distance.cdist functions similarly to Function 2.

Usage

import numpy as np
from coordgeompy.coordgeompy import dist_pll_lines_2d
from coordgeompy.coordgeompy import get_distance
from coordgeompy.coordgeompy import is_intersection_3d
from coordgeompy.coordgeompy import is_orthogonal

x1 <- c(1, 2, 3, 4)
x2 <- c(5, 6, 7, 8)
get_distance(x1, x2, metric="Euclidean")

Documentation

The official documentation is hosted on Read the Docs

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

Contributors

We welcome and recognize all contributors. Names and GitHub @usernames listed below:

  • Arlin Cherian: @arlincherian
  • Nico Van Den Hooff: @nicovandenhooff
  • Zheren Xu: @ZherenXu
  • Jordan Casoli: @jcasoli

License

coordgeompy was created by Jordan Casoli, Nico Van Den Hooff, Arlin Cherian and Zheren Xu. It is licensed under the terms of the License: MIT

Credits

coordgeompy was created with cookiecutter and the py-pkgs-cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coordgeompy-1.0.10.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coordgeompy-1.0.10-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file coordgeompy-1.0.10.tar.gz.

File metadata

  • Download URL: coordgeompy-1.0.10.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for coordgeompy-1.0.10.tar.gz
Algorithm Hash digest
SHA256 bd7de1db501c2a93aeaf0d51e35fc1d34af003d61a015d012540dc7d24c0ac90
MD5 7ac1ab377aa26e080f7b03d3906b525e
BLAKE2b-256 25cb85662ce15f580eb9541d221050cc504f9c1a42fb3181aa7ae3e1e1e6b871

See more details on using hashes here.

File details

Details for the file coordgeompy-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: coordgeompy-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for coordgeompy-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 734a0c68fe96d28b8ae5b3fa25a26be47972dc558cd3a2e6982fd140b828d323
MD5 397c38af6dd8c0373f3e4b179fd8d41e
BLAKE2b-256 c755be5d7a2b74dd29036f4840a6a7b8adff65a5c8c10ffb58b7cd368fc625d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page