POV-Ray : Newsgroups : povray.general : Slightly faster VRand_On/In_Sphere() : Re: Slightly faster VRand_On/In_Sphere() Server Time
4 Aug 2024 02:24:06 EDT (-0400)
  Re: Slightly faster VRand_On/In_Sphere()  
From: Christopher James Huff
Date: 18 Nov 2003 14:45:53
Message: <cjameshuff-35296B.14423918112003@netplex.aussie.org>
What are you trying to do? Your messages don't seem to have much to do 
with the ones they reply to. And what advantages do your versions have? 
We already have two simpler versions that are tested and pretty well 
proven to give the correct distribution.

Plus I see several errors in your code, even after syntax is corrected 
enough for the macros to parse...for example, "min(rand(sd),0)" is 
always 0. Using max() doesn't make any more sense...it would have no 
effect. "pow(rand(sd), x)" is meaningless...raising a random number to a 
power of < 1, 0, 0>? Fixing the parentheses and semicolons, removing the 
min(), and substituting 2 for x gave something that didn't even come 
close to an even spherical distribution, with either of your macros.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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