Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.51 KB

README.md

File metadata and controls

56 lines (40 loc) · 1.51 KB

Circle Operations

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.


Quickstart

Basic example for getting the distance between two circles:

>>> from geom.circl import Circle
>>> print(Circle([4,10,1]).distance([6,10,1]))
2

Main dependencies

  • Numpy
  • Pandas

Functionalities

Some examples of the classes' methods that are needed to achieve the end goal:

Point

  • 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.

Circle

  • 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.

More info

Refer to ./notebooks/tutorial.ipynb for a mostly comprehensive how-to.