Geometry Package
Project description
Team 1 4900 first project
Computational Geometry package for Python.
This package grants functionality on a 2-d euclidean plane.
Functionalities include:
- Line segment intersection: Find the intersections between a given set of line segments.
- Closest pair of points: Given a set of points, find the two with the smallest distance from each other.
- Convex hull: Given a set of points, find the smallest convex polyhedron/polygon containing all the points, represented as the set of points on the polygon edge.
- Largest empty circle: Given a set of points, find a largest circle with its center inside of their convex hull and enclosing none of them.
- graphing all of the above listed functionalities
How to Call new_math.py functions:
generate_random_list_of_points(): Returns a tuple of x,y points
Line segment intersection: show_all_line_intersections(list_of_your_lines)
Closest pair of points: find_closest_pair_of_points(list_of_points)
Convex hull: show_convex_hull(list_of_your_points)
Largest empty circle: l largest_inside_circle(list_of_your_points)
How to Call graphing.py functions - use tuples
add_points(list_of_points)
show_closest_pair(list_of_points) - shows all points, and the closest pair of points.
show_all_lines_and_intersections(list_of_lines) - Shows all intersections between lines
show_largest_inside_circle(list_of_points) - Shows largest empty circle
show_convex_hull(list_of_points) - Shows convex hull
TEAM REFERENCES:
- HOW TO CREATE PACKAGES - https://packaging.python.org/en/latest/tutorials/packaging-projects/
- Alex's example package - https://test.pypi.org/project/test-cs-4900-package-creation/0.0.1/
- Convex Polygon incircle - https://observablehq.com/@mbostock/convex-polygon-incircle
- Closest pair of points example algorithm: https://www.geeksforgeeks.org/closest-pair-of-points-using-divide-and-conquer-algorithm/
- Two line intersection example 1: https://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect
- Two line intersection example 2: https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
- Convex Hull algorithms, I think we should use Grahm Scan: https://en.wikipedia.org/wiki/Convex_hull_algorithms
- For largest circle find the max point, find the min point and the use the circle equation to draw the circle
- For line intersection: https://stackoverflow.com/questions/20677795/how-do-i-compute-the-intersection-point-of-two-lines
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cs4900-Geometry-Package-Team-1-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1b3d8c09dbfbbb6d4fb761397e89eab3a2a33fec91ddacfd9606ae9eb4fd3cc |
|
MD5 | c61ff8546b932fd9b347c9368f710b1d |
|
BLAKE2b-256 | 5520d239a339ee8c61b2036fab3e1c0727aa72d067061729913a20c5db17931d |
Hashes for cs4900_Geometry_Package_Team_1-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c2a0dc5631f6fbb3327f5dee65d32308b62093699314d67760ee8efa4f4e344 |
|
MD5 | e4b73d412ccc662a3276df5d5b402ba9 |
|
BLAKE2b-256 | c1bb6d273823ab1a686110bc0d36d4280f5a648dc85d83f4a56446910baa84d2 |