Do you know those brilliant moments, when youāve spent like a whole day desperately trying to figure something out via geometry nodes (to no avail), until it occurs to you:
Thereās that one dead-simple algorithm, which does exactly what you want, only better. And you know it actually exists, and works, and how it works. Because you personally imlemented it in Python a few years ago. And thereās nothing about it you cannot do in geometry nodes. Just thinking of it earlier would have saved yo u hours.
From a set of points in the XY-plane, construct the delaunay-triangulation [Blender 4.01]:
It should be noted all input point coordinates should be > 0 along both axis. Otherwise the fact (-n)Ā² == nĀ²
will cause trouble (see the first frame node in the screenshot).
Come to think about it, for robustness a Triangulate
node should probably be inserted right after the Convex Hull
node in the tree shown above. Else an unfortunate choice of input coordinates could probably cause the Convex Hull
node to make a 4+ sided face where 4+ verts might just happen to end up coplanar.
If you wonder why not just use the Fill Curve
node and be done with it: The problem is, starting from an arbitrary set of points in the plane, using something like
Points
> Convex Hull
> Mesh To Curve
> Fill Curve
means you loose all the internal points (inside the convex hull).
It would probably work, if you had an order on the points such that the Points to Curve
node (given that order via itās Weight
input) could make a hamiltonian path over all the points, but that should be hard to come by in practice.
Thatās a fair point, and a thought along those lines occured to me myself just today.
That said, I think screenshots do have their merit too.
Personally, Iād vote for go with screenshots and make the .blend an extra goodie if you like (unless you have it already wrapped into a nifty nodegroup for personal use, making a screenshot is cheaper than getting things into a redistributable state).
At least if youtube videos are anything to go by, many seem to have an unhealthy relaxed attitude towards those curved bezier connections messily criss-crossing arbitrarily and everything being beyond unreadable for that reason alone.
Iād probably spend almost as long reshuffling other peopleās messy graphs/trees into something my brain can actually make sense of, as I would recreating something like the screenshots above node by node.
greetings, Kologe