Creative Coding Demos

Some simple physics simulation coding practices using p5.js


Interactive fishpond
Right clicks draw ripples in the pond and trigger different effects in different modes. In Ripples Mode, nothing happens except for the ripples. In Fishfood Mode, each click throws fish food into the pond and thus fish cluster around where the cursor is. In Pebbles Mode, mouse clicks are pebbles that repel fish. Simple physics knowledge are programmed to simulate the attraction and repulsion.


Tree generator
Autonomous agents

Flocking fish
Flocks


Color adder
Particles of two colors move as flocks to the center and create the third color by color addition theory. At the same time color names are shown.

Leave a Reply