This repository provides a set of basic geometric circle operations. The end goal was to create an algorithm that calculates the exact total area of overlapping circles (while overlapping areas would be included only once). To achieve this step-by-step, a set of classes were created, namely Circle and Point.
Basic example for getting the distance between two circles:
>>> from geom.circl import Circle
>>> print(Circle([4,10,1]).distance([6,10,1]))
2
- Numpy
- Pandas
Some examples of the classes' methods that are needed to achieve the end goal:
distance()
: Computes the distance between two points.centroid()
: Computes the centroid of a number of points.angleBetween()
: Computes the angle between two points and a vertex.polyArea()
: Computes the area of a polygon.
intersect()
: Computes the intersections of circles.get_cluster()
: Computes the circle clusters.intersectArea()
: Computes the intersection area of two circles.calcBoundaries()
: Computes the boundaries of a circle cluster.
Refer to ./notebooks/tutorial.ipynb for a mostly comprehensive how-to.