A variation on flock on a plane using a rather small flock of 500 particles. Each frame the Delaunay triangulation is calculated. The vertices are colored according to their movement direction. This gives a nice 3D illusion.
It was important to get the triangulation as efficient as possible to maintain a decent frame rate. Writing my own code was no option this time. So I used John Lloyd’s QuickHull3D package. It’s clean efficient code to calculate the convex hull of a collection of points. Additionaly it meshes nicely with Processing. The technique to use a 3D convex hull to construct the 2D Delaunay triangulation is well described: lift the 2D points onto a 3D paraboloid surface, calculate the convex hull of this surface and project the faces back down on the plane.