POV-Ray : Newsgroups : povray.advanced-users : Colision testing ? : Re: Colision testing ? Server Time
29 Jul 2024 12:28:07 EDT (-0400)
  Re: Colision testing ?  
From:  Light Beam 
Date: 23 Apr 2002 05:58:41
Message: <3cc53051@news.povray.org>
I have another idea but I don't know how to use "arays" with pov...

Make a loop to put the objects only in 2 dimensionnal coords. using arrays
(for exemple : box {<rand(a[8])*10, rand(b[8])*10, 0><rand(a[8])*10,
rand(b[8])*10, 1>} -> the number inside [] are the number of the array )
then made a second loop that check all the box created before this (in this
example from 1 to 7) and restart until the random number was different from
this one... pfff, So I dont know if "arrays" makes its in PoV !?


i06acu4occgp43qjftefvkfu7ct075vd59@4ax.com...
> On Mon, 22 Apr 2002 23:07:46 +0200, "_Light_Beam_" <fac### [at] aolcom>
wrote:
> > I must duplicate an object included in a "bounded_by" box, but how can I
> > make to be sure the duplicated objects (for example 5 objects) doesn't
be
> > placed inside an other (Excuse me for my poor English).
>
> probably it is not the fastest but rather simplest to explain method:
> 1. create and set location for both sets of objects
> 2. perform intersection{} on them
> 3. use VRand_In_Obj() to find any point in object
> if returned point isn't inside intersection then you can be almost sure
they
> not overlap
>
> ABX


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.