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

Concave forms are not triangulated correctly #26

Closed
GoogleCodeExporter opened this issue Oct 24, 2015 · 1 comment
Closed

Concave forms are not triangulated correctly #26

GoogleCodeExporter opened this issue Oct 24, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I recently discovered a small problem when I tried to triangulate
concave shapes. I don't know if I used your library in a wrong way or if
there's a bug in it.

The situation is the following: I have a concave shape that looks like a
"C", composed of 4 points. I would expect, that two triangles are
returned for this shape: One for the upper half, one for the lower one.
Unfortunately, the two triangles do exceed the natural given form of the
"C" and don't represent the shape correctly.
I created a small test case I attached for you to reproduce this
behaviour. I know this test case is not very good, but it shows the
problem I have.
I also implemented a small extension (AdvancedPolygonPoint) to keep a
unique Id for each TriangulationPoint. It was easier that way to get to
the problem :)

Original issue reported on code.google.com by furtelw...@gmail.com on 4 Jul 2011 at 2:14

Attachments:

@GoogleCodeExporter
Copy link
Author

You are triangulating a PointSet and not a Polygon.

A PointSet is just a bunch of points in the plane that the triangulator will 
perform a Delaunay triangulation on. The end result should result in a convex 
triangulation (tho not 100% implemented yet). But in most cases you endup with 
a triangulation that is convex. 

What you want to do is to Triangulate a Polygon(the "C") so use a Polygon class 
instead of a PointSet.

Original comment by thahlen@gmail.com on 4 Jul 2011 at 2:46

  • Changed state: Done

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

No branches or pull requests

1 participant