Skip to content

guillaume-marion/circle-operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.


About

Numpy ndarray subclassing for geomtric operations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published