C++ project about making this animation :
- CGAL library (not the openFrameworks addon)
- openFrameworks
- Make a 2D triangulation inside a shape (constrained delaunay triangulation with CGAL)
- Define the graph of the triangulation
- Make a tree from the graph (depth/breadth first search for example, but here a priority queue with random weights is used)
- Follow one side of the tree (rotate around vertices and recursively rotate around new vertices if you see an edge of the tree graph) and build a curve with one new point for each triangle
- Use an array with cumulative lengths through the curve and binary search to be able to move through the curve at constant speed (parameter p of the curve from 0 to 1)
- Draw m particles, particle i being at position of parameter p=(i+t)/m. t is the time from 0 to 1
Explanation gif :