Sign in to follow this  

Detecting winding of an arbitrry polygon

This topic is 3408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Given a closed 2d polygon how can I tell if its clockwise or counter clockwise? I'm feeding it to a triangulation routine which requires a certain winding. Right now the best I ahve come up with is feed it to the triangulation and throw away the result that has fewer triangles ;-) Seems like something I should be able to tell in advance and my google voodo has not come up with the right magic words.

Share this post


Link to post
Share on other sites
Quote:
Original post by Nutter
hm, good point. This should do the trick then: http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/

I wondered why you sent me to the area algorithm, until I read this one http://local.wasp.uwa.edu.au/~pbourke/geometry/clockwise/index.html#clockwise

Thats a great site - thanks.... google must pass him by (or rank him prety low)

Share this post


Link to post
Share on other sites

This topic is 3408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this