POV-Ray : Newsgroups : povray.newusers : trace function Server Time
25 Nov 2024 09:44:07 EST (-0500)
  trace function (Message 1 to 5 of 5)  
From: shimon a10
Subject: trace function
Date: 22 Jan 2006 07:30:00
Message: <web.43d37a9798a2d8cb731a6f9e0@news.povray.org>
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


Post a reply to this message

From: Alain
Subject: Re: trace function
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

From: shimon a10
Subject: Re: trace function
Date: 22 Jan 2006 15:05:01
Message: <web.43d3e501b5dd53695a8ded0@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 lots of thanks for your help.

1. first i want to ask how can i see the value of Point (like in matlab, if
   i want to debug my plan).
2. second, what do you mean with your Hint.
3. and last, thanks again.
5. bye.

shimon


Post a reply to this message

From: shimon a10
Subject: Re: trace function
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

From: Alain
Subject: Re: trace function
Date: 23 Jan 2006 13:20:11
Message: <43d51e5b$1@news.povray.org>
shimon_a10 nous apporta ses lumieres en ce 22/01/2006 15:18:
> Alain <ele### [at] netscapenet> wrote:
> 
>>shimon_a10 nous apporta ses lumieres en ce 22/01/2006 07:29:
>>
>>
>>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
> 
> 
1. I must predeffine the variable to be used. A value of <0,0,0> is a good padding
value and the 
result if the trace never encounter the target object.
2. Look at the repply from Chris in the debug thread.
3. What I mean is that when you make your scene and use variables or other
identifiers, it's better 
that the name contains upper case characters, at least one, usualy the first. It's a
recommended 
practice that many begginers tend to forget. It may not be of immediate use in your
case, but good 
to know anyway.

-- 
Alain
-------------------------------------------------


Post a reply to this message

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