Apurba's P5.JS Experiments

“I walked in universes where the laws of physics were devised by the mind of a mad man.”

Doctor Who

The following is an assortment of P5.JS sketches (JavaScript programs that manipulate HTML5 Canvas) I have coded from time to time. They involve coding up a small physics engine with friction, gravity and other forces.

Each of the following programs employ a "Mover" class, which has information in vector form such as the object's location, velocity and acceleration. Other than methods to display and move the objects in the canvas, the Mover class also has an "applyForce( )" method, which enables the objects to experience any force in vector form. Afterwards, multiple objects were generated using JavaScript arrays.

JavaScript HTML5 Canvas Animation Interactivity Creative Coding

Tree inspired Physics Simulations

Fractal Tree
View Sketch
Gravity Tree
View Sketch
Mutant Tree
View Sketch

Nature inspired Physics Simulations

Firefly in the night
View Sketch
Gust of Wind
View Sketch
Perlin Noise Snakes
View Sketch
Stringy Grid
View Sketch
My big head
View Sketch

Made with by Apurba