POV-Ray : Newsgroups : povray.general : Help with a spherical container : Re: Help with a spherical container Server Time
4 Aug 2024 02:17:29 EDT (-0400)
  Re: Help with a spherical container  
From:
Date: 6 Nov 2003 01:55:14
Message: <3fa9f052@news.povray.org>
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

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