|
![](/i/fill.gif) |
"Kenneth" <kdw### [at] earthlink net> wrote in message
news:web.484b4a43784caf0d78dcad930@news.povray.org...
> "Chris B" <nom### [at] nomail com> wrote:
>
> I do feel sorry for new users trying to make sense of the trace operation,
> given
> the short and somewhat perfunctory explanation of it. It's such a powerful
> feature of POV-Ray! But some of the documentation just isn't as clear as
> it
> should be.
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.
Maybe this is a prime example of where the wiki at http://wiki.povray.org/
could be used to collaboratively develop a clear and succinct 'how-to'
explanation suitable for newer users.
> ... Another item of
> confusion: Somewhere above the trace explanation, it says, "The following
> are
> the functions which return vector values." The important word being
> RETURN.
> But there are other functions following trace that actually DON'T return
> any
> value (vnormalize being one.) Pity the poor new user trying to understand
> all
> of this!
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.
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |