Constrained Random Walk

​
number of steps
5000
mean step size
1.5
opening size
15
wall thickness
10
⊕
This Demonstration simulates a random walk of a particle constrained within a square. An impermeable wall divides the square into two equal parts and has a central opening that lets the particle move between the two halves.
The particle starts at the red locator and ends at the green circle; you can drag the red locator.
Each successive step of the particle is a vector with standard normal components. This results in the angle following a uniform distribution and the norm following a Rayleigh distribution.

External Links

Random Walk (Wolfram MathWorld)
Rayleigh Distribution (Wolfram MathWorld)

Permanent Citation

Erik Mahieu
​
​"Constrained Random Walk"​
​http://demonstrations.wolfram.com/ConstrainedRandomWalk/​
​Wolfram Demonstrations Project​
​Published: July 26, 2013