POV-Ray : Newsgroups : povray.binaries.images : Red Spheres : Re: Red Spheres Server Time
11 Aug 2024 13:14:50 EDT (-0400)
  Re: Red Spheres  
From: Oldstench
Date: 16 Mar 2004 18:08:53
Message: <572f50piro7ibh7pitk664368foig40et2@4ax.com>
On Tue, 16 Mar 2004 17:48:59 -0500, "Slime" <fak### [at] emailaddress>
wrote:

>> Very cool! I am flattered that my pic inspired this.
>> Just curious...I assume that your spheres are placed randomly; how is
>> it that you get them to not intersect with one another?
>
>I keep an array of sphere positions, and each time I make a new sphere, I
>check the new position against every previous position in the array, and, if
>they're too close, I choose a new position. This gets really slow for large
>numbers of spheres, but I had few enough that it wasn't a problem. After
>that, it was just a matter of choosing a random number generator that
>produced a good result.
>
>I used a more complicated (but similar) technique in
>http://www.slimeland.com/images/pictures/ManyReflective.jpg , where the
>spheres could have different sizes, to keep them from intersecting. There
>were so many spheres in this image that I had to make an array of positions
>beforehand, sort them, and compare them against each other (using the
>sortedness to reduce the number of necessary comparisons). This gave a
>nearly complete list which I could use as a beginning for placing the rest
>of the spheres.
>
> - Slime
> [ http://www.slimeland.com/ ]
>

I had thought that it might have used an array, but I was unsure. Now
I know where to begin.


Post a reply to this message

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