POV-Ray : Newsgroups : povray.general : Trace question : Re: Trace question Server Time
1 Aug 2024 12:22:14 EDT (-0400)
  Re: Trace question  
From: Slime
Date: 23 Oct 2005 03:12:59
Message: <435b37fb$1@news.povray.org>
> What purpose does that serve, besides an annoying error message?  I fail
> to see how you could even get such a scene to parse without shutting
> down - you've declared the same parameter twice.

In POV-Ray, "declare" is more like a "set" statement; there's no real
declaration of variables. So

#declare myvar = 1;
#declare myvar = myvar + 1;

is perfectly fine, and myvar will have the value 2.

Aside from that, his example isn't complete as it doesn't include the Tri()
macro, but it illustrates how to add objects to a union one at a time. By
tracing against the union, you can do collision detection against previously
placed objects.

The flaw with this approach is that the union isn't optimized with a
bounding box heirarchy or anything, which means that as more objects are
added it will start to get slow to trace().

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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