POV-Ray : Newsgroups : povray.newusers : trace function : Re: trace function Server Time
29 Jul 2024 10:29:35 EDT (-0400)
  Re: trace function  
From: Alain
Date: 22 Jan 2006 10:10:37
Message: <43d3a06d@news.povray.org>
shimon_a10 nous apporta ses lumieres en ce 22/01/2006 07:29:
> hi, every body.
> 
> 1. As new user i want to know how to use the trace function, and where i can
>    get the results of the point of intersection.
> 2. pls if it possibble to get a simple exmple.
> 3. I didn't understand the exmple in the tutorial.
> 4. lots of thanks.
> 
> shimon
> 
> 
The trace() function return coordinates that you should attribute to a variable:

#declare Object = put your object's deffinition, the name is up to you
#declare NormalVector = <0,0,0>;
#declare Point = trace(Object, Start, End, NormalVector);

The variable "Point" contains the desired coordinates.
The variable "NormalVector" contains the normal at that point, zero if the trace
missed the object. 
The normal been a unit lenght direction vector perpendicular to the surface of the
object.

Hint: it's always recomended to use at least 1 upper case letter, usualy the first, in
variable 
name. ALL key-words are lower case only and all lower case variables can conflict with
the current 
ones or future ones.

-- 
Alain
-------------------------------------------------
Eat one live toad the first thing in the morning and nothing worse will happen to
you the rest of the day.


Post a reply to this message

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