Particle systems for visual experiments
Create a modest particle emitter with clear birth and death rules, then use lifetime and velocity to shape a spray, a mist, or a falling curtain.
Birth, movement, and disappearance
A particle system is easier to direct when every particle has a short biography: where it begins, how it moves, and when it disappears. You do not need thousands of particles. A few dozen with carefully chosen behavior can explain an effect more clearly than a crowded simulation.
Give particles position, velocity, and age
Represent each particle with position, velocity, and age. Add a small batch at a fixed emitter, update their positions, and remove particles beyond their lifetime. Use a consistent time unit when increasing age. Draw a single particle correctly before enabling continuous birth.
Write down the current setting for particle lifetime before making a second interpretation of the idea. Keep the first pass deliberately modest in scale. A manageable version is easier to inspect, undo, and reconstruct. Increasing complexity should answer a visible artistic need, rather than simply making the process look more elaborate. A useful acceptance check is whether older particles disappear and the emitter keeps a stable visual density. Judge that at the intended viewing size or working distance, where tiny construction mistakes and exaggerated effects can have very different consequences.
Find particles that never disappear
If the sketch slows over time, inspect the particle count. Objects outside the canvas may still exist unless you remove them. If the spray changes speed on a slower computer, examine whether movement depends on elapsed time or simply on how many frames happened.
To locate a fault, inspect the part of the result most directly affected by particle lifetime. Temporarily show construction points and intermediate values. Reduce repeated elements to a handful and pause anything that changes over time.
Separate lifetime from visible density
Compare a short lifetime with a long one while keeping the birth rate constant. Then reverse that comparison by holding the visible count roughly steady. The two experiments separate the visual consequences of trail length from the consequences of sheer density.
Arrange a small experiment with 0.5, 1.5, and 3 seconds, keeping its other decisions consistent. Predict one consequence before each trial, then compare that prediction with the actual result. Record a surprise in plain language and identify the part of the construction that could explain it. This turns a set of variations into information you can use in a later, more ambitious piece.
Remove particles without skipping neighbors
Removing an item while walking forward through an array shifts later items into earlier positions. A following particle can then escape that update. Filter the collection into surviving particles, or iterate backward when deleting by index. Keep creation and removal counts visible during development. A stable emitter should eventually reach a rough balance between births and deaths rather than accumulating an ever larger invisible population outside the image.
A paper-confetti fountain
Make a paper-confetti fountain using small rectangles that begin upward and gradually descend. Give each piece a fixed angle at birth rather than choosing a fresh angle every frame. The stable identities make the pieces feel like individual fragments moving through a shared event.
References & further reading
Examples and exercises in this guide are original teaching scenarios.
