Random walk simulation

Particle encounter lab

Running

02

Live field

Hits0
Near misses0
Active pairs0
Time0.0

Contacts are sampled at each step; a large v × dt can miss an encounter between steps.

03

Parameter guide

Start with the defaults, then change one setting at a time.

N Particles
Number of moving points. More particles create more encounters and require more processing.
v Speed
Distance travelled per time unit. Each simulation step moves a particle by v × dt.
r Hit radius
Two particles register a hit when their distance becomes smaller than this value.
m Near-miss radius
Starts and ends an encounter. It must be greater than r.
T Total time
Length of the simulated period. The run ends after approximately T ÷ dt steps.
L Box side
Width and height of the square domain. A smaller box increases particle density.
dt Time step
Time between position checks. Smaller values improve contact detection but run more steps.
Δθ Direction range
Maximum heading change in radians per step. Smaller values produce straighter paths.
Random seed
Use the same whole number to repeat a run. Leave it blank for a new random run.
Correlated walk
On perturbs the current heading; off chooses an entirely new heading each step.
AccuracyKeep v × dt small compared with r.
DensityIncrease N or decrease L for more encounters.
PlaybackChanges viewing speed only; it does not change the model.