Short and slightly faster (by 9%) than VRand_In_Sphere() from rand.inc: #macro VRand_In_Sphere(Stream) #local Y = 2*rand(Stream)-1; vrotate ( (<sqrt(1-Y*Y),Y,0>*pow(rand(Stream),1/3)), 360*rand(Stream)*y ) #end Sputnik
Post a reply to this message