Creating animated Triangle Patterns

Hi there,

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?

Best,
Dennis

1 Like

i never try a mesh like that,
but i play
-a- mouse over triangle
-b- triangle array

  • -start with 2 points
  • -every new point creates a triangle ( using the 2 prior )
  • -for starting a new strip must start again with 2 points

-c- as a class with 3 PVector i used one color ( and a count number)
-d- i try a color editor ( via key and mouseWheel )
you might take a look here

Thank you, I’ll take a look at your example!

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.