We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm desperately and unsuccessfully trying to compute Delaunay triangulation from a 3D point cloud. It's a thing that many people have been trying to tackle for years (the same question has been asked over a dozen times on this forum: here, here, also here, here again...) but that has never found a proper solution.
To the best of my knowledge, there are 4 libraries capable of computing Delaunay triangulation:
DelaunayTriangulationclasses from Toxiclibs do not support 3D
It seems therefore the only solution lies in the Hemesh library.
I would like to transform the colors of a painting into a 3D mesh via Delaunay triangulation. It's a relatively widespread technique that media artist Quayola (among others) has been brilliantly using for years.
PROBLEMS (hard to explain in english)
triangulation.getAlphaTriangles(threshold)) to limit the amount of surrounding points to connect to, but that very threshold prevents from connecting to neighboring points that are far.
As a result, this painting from John William Waterhouse:
(some dude getting hit on at a pool party)
is tranformed to this:
(all the shapes are "closed" (P3 connected to P1) but it shouldn't be that way)
With a higher threshold:
(Between two layers of polyhedrons)
Important parts of the code (it's in Python but PLEASE DO NOT MOVE THIS QUESTION TO PYTHON MODE):
threshold = 35 render = WB_Render(this) for p in points: new_points = WB_Point(p.x, p.y, p.z) list.append(new_points) triangulation = WB_Triangulate.alphaTriangulate3D(list) triangles = triangulation.getAlphaTriangles(threshold)
noStroke() for i in range(0, len(triangles), 3): render.drawTriangle(liste[triangles[i]], liste[triangles[i+1]], liste[triangles[i+2]])