POV-Ray : Newsgroups : povray.general : trace() function feature req : Re: trace() function feature req Server Time
13 Aug 2024 03:24:15 EDT (-0400)
  Re: trace() function feature req  
From: Ron Parker
Date: 19 Nov 1998 09:05:56
Message: <365425c4.0@news.povray.org>
On Thu, 19 Nov 1998 03:45:00 +0200, Margus Ramst <mar### [at] peakeduee> wrote:
>Uh... You lost me there. Surely #if (mynormal=0) returns an error? 

#if (mynormal=0) is indeed an error, but not for the reason you think it
is.  (mynormal=0) is a valid expression, but it returns a vector result.
Dan has posted code to show you what it does, or you can read the 
description in the docs under "vector operators."

>You could optionally limit the trace function with a bounding sphere (or have
>the user specify a bounding object?): when this is hit, trace() would return 0.

The way POV works is to first find all intersections, then find the closest
one (except in certain cases like isosurfaces and some other objects.)  The
existing code doesn't have a concept of bounding a ray, because there is no
use for such a thing in tracing light rays.  What you're asking for can't be
done any more efficiently in C than it can in POV script, except for certain
objects that could be optimized with much labor.


Post a reply to this message

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