Smoke particle system demo, based on Dan Shiffman’s original example for Processing.
The code makes use of the p5.Vector class, including the createVector() function. The various calculations for updating particles’ positions and velocities are performed with p5.Vector methods.
The particle system is implemented as a class, which contains an array of objects (of class Particle).
Related Examples
![](/_astro/15_Math_And_Physics-00_Non_Orthogonal_Reflection-thumbnail.DeYbXLbr_Z2sprbi.webp)
No alt text
Non-Orthogonal Reflection
Simulate a ball bouncing on a slanted surface.
![](/_astro/15_Math_And_Physics-01_Soft_Body-thumbnail.CaUlsLEf_Z2t2M4j.webp)
No alt text
Soft Body
Simulate the physics of a soft body accelerating toward the mouse.
![](/_astro/15_Math_And_Physics-02_Forces-thumbnail.76GklzEL_HHQbe.webp)
No alt text
Forces
Simulate forces on multiple bodies as they move through liquid.
![](/_astro/15_Math_And_Physics-03_Smoke_Particle_System-thumbnail.DKQ430DH_2kCjh8.webp)
No alt text
Smoke Particles
Simulate smoke with a particle system.
![](/_astro/15_Math_And_Physics-04_Game_Of_Life-thumbnail.5UrIGGfY_1qP5lX.webp)
No alt text
Game of Life
Recreate John Conway's cellular automaton.
![](/_astro/15_Math_And_Physics-05_Mandelbrot-thumbnail.DrMp2tOi_Z2016jT.webp)
No alt text
Mandelbrot Set
Visualize a mathematical set that produces fractal structures.