I’d like to create a loop animation of a triangle mesh or pattern - like this. I started looking through toxiclibs and voronoi in general. My problem though is that I don’t really know where to start and what’s already available (libraries or code snippets).
My plan so far: each triangle should be animatable (merely the color), as in the example above. Thus I would have to create a class with triangle objects and some animation. Since its a mesh, neighboring triangles share at least one coordinate which is where I struggle.
Any ideas, tipps or snippets on how to tackle this?
You may also be interested in this previous discussion – it provides a solution to triangle coloring using the Mesh library.
The key method is to use triangulate to get a list of triangles that you can iterate over. Then you just need to store one color per triangle, and you can change the color list to animate your rendering of the mesh.