Here I am storing all p5 sketches. Hosting on github pages allows me to quickly visualize and/or share them through the web.

Optical flow through webcam

In this sketch, the optical flow computed from the webcam is used to hit a ball with simple physics.

Sketch

Epidemic Simulator

This is a simple toy model of exponential growth, inspired from what I saw elsewhere. But notably, 3Blue1Brown did an amazing video mimicking this simulation too. Here We simply have every person as a randomly moving ball that when it collides when another can transmit its infected states. Lockedown and social distancing scenario are available, and the real-time build up of an histogram is shown to observe the potential flattening of the peak.

Sketch

DLA

The diffusion-limited aggregation (DLA) at play. Although the random walks are drifting towards the center to speed-up the growth of the cluster, and some interactivity allows the user to click anywhere to seed new walkers spawning under the mouse.

Sketch

Orbits

Very simple sketch, a ball orbiting around mouse position. Traces is shown with alternating colours. Damping is on at the moment (hence ball is spiralling towards focus).

Sketch

Arrows

Some recursivity…

Sketch

Game of Life

This is simulation of Conway’s Game of life (see here). Use the arrow keys to run. Click to draw pattern, middle mouse click to erase. Can import some templates using buttons.

Sketch

Fluid Simulator

Quick and dirty fluid dynamic simulator…

Sketch

Sound Vizualizzer

Some sound vizualization from microphone or sound file…

Sketch

Flocking

Sketch

1D CA

Sketch

Radial beauty

Sketch