[PD] Box Muller Gaussian noise

Charles Henry czhenry at gmail.com
Sun Mar 16 22:06:04 CET 2008


> So, we can find g(r) independently by integrating with respect to theta.
>
> we get g(r)= 1/sigma^2 * e^-(r^2/sigma^2)

Ah, here's a missing factor of 2 in the exponent.  That should be

g(r)= 1/sigma^2 * e^-(r^2/ ( 2*sigma^2) )

And the correct formulae are

x=r*cos(theta)  = sigma * sqrt(-2 * ln (1-U1) ) * cos (2*pi*U2)
y=r*sin(theta) = sigma * sqrt(-2 * ln (1-U1) ) * sin (2*pi*U2)


I thought I missed something...




More information about the Pd-list mailing list