Each nanobot undergoes Brownian motion. Its diffusion coefficient follows the Stokes–Einstein relation:
D = k_B·T / (6·π·η·r)
where k_B is Boltzmann's constant, T is temperature, η is the (fixed) fluid viscosity, and r is particle radius. A larger/colder particle diffuses slower.
Each frame, a particle's displacement is drawn from a Gaussian with variance 2·D·dt (real Brownian-dynamics integration), then scaled to pixels for display.
When two nanobots' surfaces come within a bonding radius, they bond with the set probability — diffusion-limited aggregation: bonded nanobots move together as one rigid cluster, and cluster velocity is inversely damped by cluster mass (more members = slower, heavier cluster), just as real nanoscale self-assembly proceeds via random collision and probabilistic sticking.