Hi all,
> And here's the macro:
>
> #declare e = 2.718281828459;
> #macro gauss(RSR)
> sqrt(-2*log(rand(RSR))/log(e))*cos(2*pi*rand(RSR))
> #end
>
I tried it and Pov-Ray assumes "log" is in base e, so log(e)=1 and you don't
need it.
But the formula would stand correct if you assume log is in base 10 because
of the base change formula log BASE e(x) = log BASE 10(x) / log BASE 10(e)
Greets
Pablo Viojo.-
pvi### [at] adinet com uy
Post a reply to this message
|