POV-Ray : Newsgroups : povray.newusers : trace function : Re: trace function Server Time
29 Jul 2024 10:19:19 EDT (-0400)
  Re: trace function  
From: shimon a10
Date: 22 Jan 2006 15:20:00
Message: <web.43d3e87cb5dd53695a8ded0@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> 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.

Hi, Alain and thanks for your help.

1. first, i need more explanation about the normal vector. why you gave it
   the value <0,0,0>?.
2. second' i want to see the value of variable "Point" (like in matlab, if i
   want to debug my plan).
3. what do you mean with the Hint.
4. thanks again.

shimon


Post a reply to this message

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