Every droplet is spawned with a random diameter (0.5-4 mm) and falls at that diameter's terminal velocity — the speed where air drag balances gravity. Terminal velocity grows with the square root of diameter for the small-drop regime, so a 4 mm drop falls roughly three times faster than a 0.5 mm one, matching real rain: v ≈ v_ref·√(d / d_ref), capped near 9 m/s for the largest realistic raindrops.
- Rainfall rate — sets how many droplets spawn per second, which directly feeds the puddle's inflow term.
- Drainage rate — a constant outflow (soil absorption / gutter runoff) that drains the puddle regardless of rainfall.
- Puddle depth — integrates
d(depth)/dt = rainfall − drainage each frame, clamped at zero, so it visibly rises during a downpour and falls once the rain eases below the drainage rate.
- Ripples — each impact spawns a ring whose radius grows at a constant speed while its amplitude decays exponentially, the same energy-spreading behaviour as a real circular surface wave.