|
![](/i/fill.gif) |
"Jan Walzer" <jan### [at] lzer net> schrieb im Newsbeitrag
news:3cbd317a$1@news.povray.org...
> yeah ... interesting technique ...
Thanx, I did it that way, because I never used trace() before :-)
> how well will this work with
> different sized spheres ?
Good, it actually does. Look again at p.b.images ;-) The size of the sphere
radius is a random number between half of square size and 0.
> would this mean that I have to
> mark some adjacent boxes as
> loaded ?
Not in my approach. But your idea should also work, but is more complicated.
You have to have
a bigger array which is a lot slower. The advance of your approach is that
there is no free space in form of a square around a sphere:
+--------+
| |
| |
| |
| O |
+--------+
If I put a sphere into a square like above, no other sphere can be put into
this
square, even if there is enough space left. That means that you never will
fill the whole place totally. As long, as you have small amounts of spheres
(e.g. 50000) compared to the highest amount of spheres (e.g. 250000) that
fits in the array (e.g. 500x500), the result will be o.k.
So long,
Bonsai
P.S. If my englisch explanation is not clear enough, you can also mail me
directly to switch over to German ;-)
Post a reply to this message
|
![](/i/fill.gif) |