timziebart / alpha-shapes

A minimal library for alpha shape computation.
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Edges to polygon #3

Closed swarmt closed 5 years ago

swarmt commented 5 years ago

This is great!

Could you suggest a method to get the outer vertices in clockwise order to create a polygon?

timziebart commented 5 years ago

Hi,

can you elaborate what you mean? If I understand correctly, you are working with 2d alpha shapes? The current code here is just written for 3d. You could adjust the code for 2d (a PR would be welcome). Afterwards, I think you can start at one edge, find the matching next one, and iterate that until you are done. Is that what you imagined?

Cheers, Tim

swarmt commented 5 years ago

Sorry Tim that was a bit vague.

I found exactly what I am looking for in here. https://pysal.readthedocs.io/en/latest/_modules/pysal/lib/cg/alpha_shapes.html#alpha_shape