p2t fails to triangulate a polygon in one order while succeeds in other

133 views
Skip to first unread message

abbas...@gmail.com

unread,
Dec 15, 2014, 9:30:55 AM12/15/14
to poly...@googlegroups.com
Hi there,

Please accept my apology if this has been asked before.

If I use poly2tri to triangulate 

1135, 4821, 1135, 1729, 1925, 2451, 2176, 2681, 2217, 2743, 2244, 2783, 2244, 2824, 2244, 2892, 2188, 2941, 2132, 2990, 2003, 2997, 2003, 3105, 3353, 3105, 3353, 2997, 3075, 2990, 2890, 2912, 2705, 2834, 2485, 2634, 1688, 1898, 2485, 891, 2817, 474, 2932, 362, 3095, 203, 3217, 155, 3302, 122, 3512, 122, 3512, 0, 2003, 0, 2003, 122, 2132, 125, 2178, 161, 2224, 196, 2224, 261, 2224, 339, 2088, 511, 1135, 1729, 1135, 698, 1135, 396, 1178, 301, 1220, 206, 1298, 166, 1376, 125, 1637, 122, 1637, 0, 57, 0, 57, 122, 294, 122, 413, 179, 484, 217, 522, 294, 573, 406, 573, 681, 573, 3509, 573, 4048, 549, 4168, 525, 4289, 471, 4334, 417, 4380, 328, 4380, 257, 4380, 115, 4323, 57, 4441, 979, 4821

It fails with "PointError: poly2tri EdgeEvent: Collinear not supported! (1135;1729) (1135;1729) (1135;698)"

And it can triangulate the following which is the same coordinates but in reverse order. Even if the points mentioned are still Collinear.

979, 4821,57, 4441,115, 4323,257, 4380,328, 4380,417, 4380,471, 4334,525, 4289,549, 4168,573, 4048,573, 3509,573, 681,573, 406,522, 294,484, 217,413, 179,294, 122,57, 122,57, 0,1637, 0,1637, 122,1376, 125,1298, 166,1220, 206,1178, 301,1135, 396,1135, 698,1135, 1729,2088, 511,2224, 339,2224, 261,2224, 196,2178, 161,2132, 125,2003, 122,2003, 0,3512, 0,3512, 122,3302, 122,3217, 155,3095, 203,2932, 362,2817, 474,2485, 891,1688, 1898,2485, 2634,2705, 2834,2890, 2912,3075, 2990,3353, 2997,3353, 3105,2003, 3105,2003, 2997,2132, 2990,2188, 2941,2244, 2892,2244, 2824,2244, 2783,2217, 2743,2176, 2681,1925, 2451,1135, 1729,1135, 4821

How does that work?

Mason Austin Green

unread,
Dec 15, 2014, 10:08:02 AM12/15/14
to poly...@googlegroups.com
P2T does not allow repeat points. Read this.

--
You received this message because you are subscribed to the Google Groups "poly2tri" group.
To unsubscribe from this group and stop receiving emails from it, send an email to poly2tri+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

abbas...@gmail.com

unread,
Dec 15, 2014, 11:10:02 AM12/15/14
to poly...@googlegroups.com
I have read that before I started using P2T my question is related to how does it work in one order and does not in another? In both cases there are repeated points. 
Message has been deleted

Richard Wells

unread,
Mar 11, 2015, 1:21:45 PM3/11/15
to poly...@googlegroups.com
I suspect this is one of those cases where undefined behavior includes the possibility that it may work despite itself (:-).

BTW, I haven't had any problem with collinear points.  It appears to me that it only fails on coincident points.

- Richard

Reply all
Reply to author
Forward
0 new messages