All Projects → jsmolka → hull

jsmolka / hull

Licence: other
Concave or convex hull around a list of points.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to hull

GurobiLink
Wolfram Language interface to the Gurobi numerical optimization library
Stars: ✭ 16 (-58.97%)
Mutual labels:  convex
Totsu
First-order conic solver for convex optimization problems
Stars: ✭ 18 (-53.85%)
Mutual labels:  convex
cvxpnpl
A Perspective-n-Points-and-Lines method.
Stars: ✭ 56 (+43.59%)
Mutual labels:  convex

hull

Concave or convex hull around a list of points.

How to use

import hull

points = [
    (207, 184), (393, 60), (197, 158), (197, 114), (128, 261), (442, 40),
    (237, 159), (338, 75), (194, 93), (33, 159), (393, 152), (433, 267),
    (324, 141), (384, 183), (273, 165), (250, 257), (423, 198), (227, 68),
    (120, 184), (214, 49), (256, 75), (379, 93), (312, 49), (471, 187),
    (366, 122)
]

concave = hull.concave(points)
convex = hull.convex(points)

The code above creates the following results:

Requirements

References

  • The concave hull algorithm is based on a paper by Adriano Moreira and Maribel Yasmina Santos.
  • The convex hull algorithm is an implementation of Andrew's monotone chain algorithm.

Disclaimer

  • Some parts of the concave hull algorithm were copied from Mapotempo's Ruby approach.
  • The entire convex hull algorithm is copy-pasted from a wikibook about algorithm implementations.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].