Closed vkuchinov closed 4 years ago
Unfortunately this algorithm has no way of controlling how triangulation is formed in a case where there can be multiple Delaunay triangulations of the same point set (such as a grid). You could try rearranging it with a custom script but I'm not away of existing code examples to do so.
That's really sad. I don't want to write another post-processing script for re-sorting, cause it could slow down the whole performance. I will try to tweak Delaunay.JS by extending 3D vectors with another indexing value and tweaking triangles generation according to these values.
It's not only the indexing that changed, but the triangles themselves are different. For example in the lower left there's a square that has a different triangle in Delaunator than in your original set of triangles. And Delaunator can't always reuse your original triangles because they're not a valid Delaunay triangulation.
Two ideas:
Hi there,
I have a pseudo quadtree geometry (THREE.BufferGeometry) set by a series of points.
Each partition has to be rendered through its own draw call by geometry.addGroup() method and individual material. Everything works fine.
However, for my own purposes, I have to use your Delaunator.JS to process original geometry and it seems that output has another indexing for triangles (faces) starting from center.
So, is there a way to rearrange faces back to original indexing, so I could get the same result as my first image with similar multiple draw calls?
I'm not asking for tweaking your Delanuator.JS code but for some hints.