POV-Ray : Newsgroups : povray.unofficial.patches : crackle: suggested extensions : Re: crackle: suggested extensions Server Time
1 Sep 2024 18:16:50 EDT (-0400)
  Re: crackle: suggested extensions  
From: Anton Sherwood
Date: 16 May 2001 22:39:34
Message: <3B033A20.637F891D@pobox.com>
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] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.