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

ADDED self-intersecting polygon decomposition #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pshtif
Copy link
Contributor

@pshtif pshtif commented Jul 15, 2014

Added a method decomposeSelfIntersecting which will decompose specified polygon into an array of simple polygons. Its just a first draft out of my mind with possible optimizations, I didn't use any source material.

Added a method decomposeSelfIntersecting which will decompose specified polygon into an array of simple polygons. Its just a first draft out of my mind with possible optimizations, I didn't use any source material.
@azrafe7
Copy link
Owner

azrafe7 commented Jul 16, 2014

Thanks for taking a crack at this. It would be really nice to have this feature.

From testing your initial impl. I can see that the resulting decomposing polys can sometimes overlap, which could be unwanted (you can try it with a star-shaped self-intersecting poly).

@pshtif
Copy link
Contributor Author

pshtif commented Jul 16, 2014

Yea I am well aware that results can overlap thats what I was after instead of substraction of such polys which is common behavior in some other poly renderers. Anyway this method has bugs and will not work when first/last segment intersect with something I already fixed that and will commit new.

@azrafe7 azrafe7 force-pushed the master branch 5 times, most recently from 1cd0234 to 3c44bb8 Compare May 29, 2015 11:41
@azrafe7 azrafe7 force-pushed the master branch 3 times, most recently from c600cf3 to 23cd173 Compare October 18, 2015 03:55
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

Successfully merging this pull request may close these issues.

None yet

2 participants