mapbox / delaunator

An incredibly fast JavaScript library for Delaunay triangulation of 2D points
https://mapbox.github.io/delaunator/
ISC License
2.24k stars 139 forks source link

Replace InCircle by Distance ? #58

Closed w77 closed 4 years ago

w77 commented 4 years ago

Hi,

Instead of using circle, isn't it faster to compute digonals distances ?

If the triangles are ABC and BCD. The delaunay edge is the shorter of BC and AD, right ?

It may be faster to compute BC and AD magnitude and get the shorter one instead of computing the whole circle stuff.

mourner commented 4 years ago

No, it's not equivalent. Here's a GIF demonstrating configurations with the same BC & AD distances where Delaunay condition changes depending on position:

w77 commented 4 years ago

Ok, thank you for the answer and all delaunator stuff. Le lundi 10 février 2020 à 11:28:46 UTC+1, Vladimir Agafonkin notifications@github.com a écrit :

No, it's not equivalent. Here's a GIF demonstrating configurations with the same BC & AD distances where Delaunay condition changes depending on position:

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.