|
|
Now that I've got some spare time on my hands,
I'd thought I'd finally bring my non I/O Particle-System
to an end, even if there are some improvements that
might be done, I want to have it called "Finished",
this wasn't supposed to become a project for life. :-)
Anyways, I need an algorithm which takes any object
and samples positions on and inside that object (to
make objects "emitters").
What I thought of was two spherical "hulls". The first
must be set larger than the object itself, this could be
figured by accessing the boundary box. The second would
be somewhat smaller, but still larger than the object.
Then I'd trace a ray from a random position of the first
sphere to a random position on the second sphere.
I'd could then sample along the ray which positions are
on the object, which are inside, and which aren't.
But I don't know if this sampling with two spherical hulls
will give me enough widespread results. I'd thought about
making subsections, eight per sphere, and then cast rays from
one sphere and one section to the othter sphere with a
section which lies opposite to the section of the first sphere.
Anyways, anybody got any better sampling ideas?
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde
Post a reply to this message
|
|