Nature Of Code

Roles: Programmer
javascript, p5.js

Nature of Code Experiments is a collection of programmed finite movement and textures emulating natural elements.  I started this project not only to develop my javascript literacy for Dan Shiffman‘s p5.js class Nature of Code, but also to examine my facination with mechanical systems of the natural world.

My explorations in movement have been based in condensing elements to their most basic forms, simplifying to trick the eye into forgetting the more subtle movements of these components. Through these javascript sketches, I’m able to explore what makes us believe something is natural or man made. Its an experiment in imitation and emulation.

Each program is paired with a gif of the movement it’s emulating below.

Special thanks to Dan Shiffman and The Coding Train.

Ant Movement

Based off of Dan Shiffman’s Flocking Coding Challenge

Ants move in generally organized, but internally chaotic patterns, following the greater masses to circumnavigate obstacles. 


Slime Mold

Slime mold movement is slow (in reality it only moves a few centimeters a day) but deliberate. Dispite a lack of any brain, it is able to navigate an environment and potential food sources with relative ease. I was facinated by its simiarity in texture to fractal patterns, something I’ve found frequently in researching potential terrestrial systhems. 

Fruit Fly Movement

Fruit fly movement can be specified to 100 distinguishable, gender-specific behavioural states. To the human eye, their movement is random and doesn’t seem to be based off of their interactions with other fruit flies in their vicinity.


Water Droplets

Click to create ripples

Julia Rich (Dot Com)