butterflies.

Lines drawn between invisible vertices.


A set amount of vertices are created with random positions and velocities in the center of the canvas. With each frame of the draw loop, the vertices x and y positions are affected by their x and y velocities. If a vertex reaches an edge of the center square, its relevant velocity is inverted in order to bounce the vertex in the opposite direction. If any vertices are within a set proximity of each other, a line is drawn between them. After 5 seconds of the program running, the draw loop is halted for the result.