|
![](/i/fill.gif) |
PM 2Ring wrote:
> "Anthony D. Baye" <Sha### [at] spamnomore hotmail com> wrote:
>
>>I've been working with a tutorial on the trace() function in conjunction
>>with a random placement macro. I'm getting some great results, but I was
>>wondering: Is there any way to make my macro take into account the objects
>>it's already placed on the surface, such that there would not be any
>>overlaps? I'd like to be able to have the objects pile up as more of them
>>are generated.
>>
>>Regards,
>>
>>A.D.B.
>
>
> Do you know you can add to a union? Here's an example from one of my Penrose
> triangle scenes.
>
> //---------------------------------------------------
>
> #debug "\nIgnore following warning, this union intentionally empty\n"
> #declare Null = union{}
> #debug "Ignore previous warning, this union intentionally empty\n"
>
> #declare SetT = Null;
>
> #macro AddTri(A,B,C) #declare SetT = union{object{SetT} Tri(A,B,C)} #end
>
> //---------------------------------------------------
>
> Also take a look at these POV standard scenes:
> advanced/gaussianblob.pov by Greg M. Johnson (& Rico Reusser).
>
> and
>
> advanced/blocks/makestacks by Gilles Tran, derived from work by John Van
> Sickle and Christoph Hormann, although this one has bits I don't quite
> follow myself as yet... :)
>
> I hope this helps.
>
>
Thanx.
After a little thought, I was able to implement a stacking function
based largely off the code snip you posted. I am, however, still getting
some overlap. I think it's going to have to be a combination of the two
methods suggested.
I need to figure out a way to trick the macro into thinking that the
object's bounds extend a minimum distance (Laterally) from the actual
object. Can this be done by setting the bounding box manually? If so,
how is this accomplished?
I've posted a test render in P.B.I.
Regards,
A.D.B.
Post a reply to this message
|
![](/i/fill.gif) |