If the spheres are very tight to each other then jittering is the keyword: instead of
true pseudo-casual (forgive the oxymoron) positions you put your spheres through a
loop, then translate each position by a little random amount.
Otherwise dividing your Universe into boxes and checking the adjacent boxes only
should speed things of course. Try also this: if a position fail don't trash it but
try and translate that by a little amount (for example the diameter of the sphere) in
the four directions. You could use the number of spheres already in the box as
indicator of the probability (so the feasibility) of success of these translations.
--
Jonathan.
Home: http://digilander.iol.it/jrgpov
Post a reply to this message
|