Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polygon winding order #2

Open
mattdesl opened this issue Oct 5, 2015 · 1 comment
Open

polygon winding order #2

mattdesl opened this issue Oct 5, 2015 · 1 comment

Comments

@mattdesl
Copy link

mattdesl commented Oct 5, 2015

I'm trying to use this with polygons to determine the winding order. However, it seems to be suited for a small number of points (triangles and such mostly?).

In Chrome, the following with a larger set of points (e.g. 20+) tends to crash the browser:

var orientation = require('robust-orientation')
orientation.apply(orientation, path)

Is there a module better suited for this?

@mikolalysenko
Copy link
Owner

This computes the orientation of d+1 points in d dimensions. For a polygon, you would need to integrate over each triangle and then test the sum of all the areas to get the orientation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants