Lévy Construction of Brownian Motion on [0,1] — Dyadic Refinement

Controls

Current n: 6
Scale: 2.0x
Overlay B^(k), k<n (faint)
Auto-increase n
B(1)
Max |B(t)|
Lévy midpoint rule: B(m)=½(B(a)+B(b))+2^{-(n+1)/2}Z. Interpolated linearly between dyadics.
Finance hook: to get a GBM path, set S_t=S_0·exp((r−½σ²)t+σB_t). (Not plotted here; you can add it easily.)