POV-Ray : Newsgroups : povray.newusers : trace function question : Re: trace function question Server Time
29 Jul 2024 02:34:52 EDT (-0400)
  Re: trace function question  
From: Jim Charter
Date: 16 Jan 2007 01:28:22
Message: <45ac7086$1@news.povray.org>
serfurj wrote:
> Hi, I'm trying to make the following script place the cylinders evenly on
> the sphere, but they're showing up clustered.  Any idea why?  How can I
> place them evenly on the sphere?
> 




Your Start positions are clustered, specifically in the positive 
quadrant, that is why.  Also note that they are posibly < the radius of 
your sphere

You might get to adequately even results most quickly by using the 
"vrotate" function

ie #local Start = vrotate ( <0,0,-2>, <rand(S)*360,rand(S)*360,0> )
*remember that the triplet specifying the rotation is in degrees


Otherwise the most methodical approach would be to begin with an even 
distribution of Start points around the sphere then "jitter" each 
location slightly with a random factor between -1 and +1

look in the rand.inc file, there are macros there that will return a 
distribution around zero and within -1 to +1.  There are also some 
different types of random distributions


Post a reply to this message

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