|
![](/i/fill.gif) |
"Chris B" <nom### [at] nomail com> wrote:
> Your inner loop is looping forever.
> If you add:
> #debug concat("SizInt: ",str(SizInt,3,3),"\n")
> to the end of your inner loop you'll see that it never reaches the end
> condition where SizInt>=6, so it keeps going.
>
> I don't think the min_extents and max_extents functions are doing exactly
> what you think they're doing because I believe these work more on bounding
> boxes of the intersecting objects than on the actual bits of space occupied
> by the parts of the object. As soon as the bounding box from the union of
> dice fills the cylinder your condition therefore fails to end the loop, even
> though there's space available between the existing dice. ie it can't find a
> position where the bounding boxes don't intersect.
>
> You're probably better off recording the centre positions of the dice in an
> array and looping through the array to see if the centre to centre distance
> of the next dice from each existing dice is large enough to avoid
> collisions.
>
> Regards,
> Chris B.
Thanks Chris,
That was what I was hoping to avoid, but I've done it, and I'm happy with the
results. Basically having fun with wood, chrome and glass, particularly a
convex/concave meeting of chrome and glass, and the interplay of a bright
burning sun. Here is the immediate result:
http://au.geocities.com/gjdolby/jpgs/pillar_20.jpg and here is the evolution:
http://au.geocities.com/gjdolby/gifs/yahtzee.gif
Regards, Graham
Post a reply to this message
|
![](/i/fill.gif) |