|
![](/i/fill.gif) |
Does anyone know of a simple way to test whether one shape is inside another?
I'm looking to fill a random volume - say a radius 10 sphere, with other objects
randomly spaced about - say radius 1 spheres. That's easily accomplished with
RAND and a loop with a test #if
(random1*random1)+(random2*random2)+(random3*random3) < 1 ... then sphere is
inside and can be drawn.
Then I can make a hemisphere out of this object by amending the test to add an
#if random1 > 0, for example.
But what I'm really looking for is a way to make a transparent complex CSG
object, and then fill it with spheres or other objects using a test, "#if
inside_CSG_object".
Does anyone know a way of accomplishing this? I've looked and looked, and I
realise I might be missing something very obvious...
Post a reply to this message
|
![](/i/fill.gif) |