Hi there! I came across this image in a post written by artist Zach Lieberman, and I’m trying to create a definition that would be able to generate similar types of triangulated 2d meshes.

In the post he explains that he uses this technique to shade 2d shapes to give them the appearance of being 3d. The focus of my query pertains to the triangulation.

You can see that the triangular mesh gets more dense the closer you are to the edge. I thought about how one would go about populating a given geometry with points following this distribution, and all I can think of is to subdivide the surface into three zones (or bands), populate each zone with a different number of points, and then to triangulate the whole lot. I’m wondering if there is another way to go about this as the resulting triangulation doesn’t look as… clean? The triangles in his example look more equilateral. I dunno, maybe it looks okay once I add colour.

Bonus question: I want to shade the triangles based on a colour gradient, from blue to white: the smallest triangles being blue, and largest being white. I presume that I can base this on the area of each triangle, and setting up the range based on that. I tried something (which is included in the definition), but I always struggle to figure out how gradients work… Any help would be appreciated!

blob mesh triangulation 2023-06-17gh.gh (17.6 KB)