|
![](/i/fill.gif) |
Anton Sherwood wrote:
> theta = rx*2*pi;
> phi = acos(2*ry-1);
> v0 = sphere_to_xyz(theta,phi); /* uniform by Archimedean theorem */
> vtemp = one of the axis vectors,
> corresponding to the smallest component of v0;
> v1 = vaxis_rotate(vtemp,v0,rz*360);
> v2 = vcross(v0,v1);
> v0 = vcross(v1,v2);
oops, make that last line v1=vcross(v2,v0).
> v0,v1,v2 are the new basis.
--
Anton Sherwood -- br0### [at] p0b0x com -- http://ogre.nu/
Post a reply to this message
|
![](/i/fill.gif) |