BruceJawn / poly2tri

Automatically exported from code.google.com/p/poly2tri
Other
0 stars 0 forks source link

crash with square polygon #99

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
the attached polygon crashes poly2try. I scaled the data from -1 to 1 and 
trimmed the precision to 12 places. 

Original issue reported on code.google.com by slug...@gmail.com on 23 May 2014 at 7:19

Attachments:

GoogleCodeExporter commented 9 years ago
The collinear tests uses epsilon 1e-12. Seems rounding to 12 places you still 
can get problems with this test when points are pretty much on a straight line. 
I suggest you round to 10 decimals for stability and you can live with that 
precision.

Now it failed on these three points:
 0.039998765886 -0.0435900408056
 5.65431943371e-016 -0.043590040805
 -0.039998765886 -0.0435900408056 

Should solve your problems.

Original comment by thahlen@gmail.com on 23 May 2014 at 8:14