POV-Ray : Newsgroups : povray.general : Trace question : Re: Trace question Server Time
1 Aug 2024 12:23:59 EDT (-0400)
  Re: Trace question  
From: PM 2Ring
Date: 22 Oct 2005 04:35:01
Message: <web.4359f9024e074c21ae306d60@news.povray.org>
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> 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.


Post a reply to this message

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