Points from Delaunay Triangles

65 views
Skip to first unread message

Rushi Shukla

unread,
Jun 2, 2014, 4:19:16 PM6/2/14
to poly...@googlegroups.com
Hello

I am new to using Poly2Tri. I have a list of Delaunay Triangles after the triangulate function. I want to extract the points of each triangle in the list one by one. Is there a method to do it ? Any sort of help is appreciated. 

obi

unread,
Jun 2, 2014, 7:00:30 PM6/2/14
to poly...@googlegroups.com
What language version are you using? There are some differences.

Rushi Shukla

unread,
Jun 3, 2014, 2:37:49 AM6/3/14
to poly...@googlegroups.com
I am using Java.

Rushi Shukla

unread,
Jun 3, 2014, 3:08:10 AM6/3/14
to poly...@googlegroups.com
The version is Java 1.7

obi

unread,
Jun 3, 2014, 6:12:08 AM6/3/14
to poly...@googlegroups.com
after triangulating a polygon you can just call

triangles = polygon.getTriangles();
for( DelaunayTriangle t : triangles )
{
    Point p;
    p = t.points[0];
    p = t.points[1];
    p = t.points[2];
}
Reply all
Reply to author
Forward
0 new messages