POV-Ray : Newsgroups : povray.newusers : Shoot a ray at a mesh : Re: Shoot a ray at a mesh Server Time
28 Jul 2024 22:22:15 EDT (-0400)
  Re: Shoot a ray at a mesh  
From: Kenneth
Date: 8 Jun 2008 14:10:01
Message: <web.484c1fe5784caf0d78dcad930@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:

>
> I do remember the trace function being quite difficult to get my head around
> when I first used it, but now, when I look at the help entry it seems fairly
> straight forward. I don't know whether the help entry has been updated over
> the years or whether it's just that the answer makes sense when you already
> know it.
>

heh, heh, I think it's the latter. It's funny how *experience* with POV-Ray
makes seemingly obtuse descriptions completely understandable...with the vital
help of the great contributors to these newsgroups!

>
> The vnormalize function does return a value, which is a unit length vector
> of the vector you pass it as a parameter. The returned value can be assigned
> to a variable using the #declare or #local statement or can be used inline
> in your SDL. The trace function is one of a small number of functions that
> requires a vector identifier as a parameter so that the function can update
> it, thereby effectively returning two values.
>

That's a clear description of the difference; better than mine by far. I should
have said that vnormalize (and *most* other functions) don't *need* to be pre-
#declared in order to be used, wheras trace and a few others do. Alas, the
current documentation makes a mish-mash of that.

Ken W.


Post a reply to this message

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