skip to content
back to forge

Brownian Motion

About

A particle simulation that cycles through multiple formations: chaotic brownian motion, grid, circle, wave, and spiral.

Technical Details

  • Chaos mode: Particles attracted to random targets within a radius, with velocity damping and circular boundary constraints
  • Shape modes: Each particle stores pre-calculated target positions for grid, circle, wave, and spiral formations
  • Smooth transitions: Individual interpolation speeds per particle create organic settling when forming shapes
  • Canvas rendering: 60fps animation using requestAnimationFrame with dynamic particle count (100-400) based on viewport