Jellyfish
Experimental Animations Built in Processing
CONCEPT
I learned Processing as part of my research assistantship at the Co-Lab For Data Impact. Working my way through The Nature of Code by Daniel Shiffman, I created a series of experiments to synthesize the principles of movement covered in the text. Staying true to Shiffman’s intentions of writing code to simulate movement as it naturally occurs in the physical world, I designed a set of algorithms to animate an abstracted jellyfish form.
DELIVERABLE
Computational design experiments
Process
I mapped out 6 vertices on Cartesian coordinates which, when connected with curved lines, would form the body of the jellyfish. To simulate the pulsing movement of the jellyfish swimming, I wrote a simple function to map incrementing Perlin noise values to the x and y values in the jellyfish’s coordinates.
To create tentacles that move organically with the jellyfish, I used the toxlibs Chain constructor to link sets of particles together with springs. I created 3 different lengths of chains and randomized the movement of the “tail” (the last particle on each chain) using Perlin noise.
I wanted to add visual interest to the animation by replicating how translucent jellyfish change colors when lights are shined on them. I created a color scale of 43 steps of interpolation and a set of 43 matching textures, which would display on a loop and create a glowing effect. The textures are mapped to the jellyfish’s vertices, so the breathe function animates them as well.
In order to make the jellyfish “swim” around the screen, I applied a simple gravitational attraction algorithm to it. The jellyfish experiences the gravitational pull of an invisible “attractor” object with a fixed location, causing it to orbit around the attractor in an infinite loop. I originally created a different movement algorithm that made the jellyfish bounce off of the edges of the screen, but the gravitational oscillation felt more natural.