|
![](/i/fill.gif) |
shimon_a10 nous apporta ses lumieres en ce 22/01/2006 15:18:
> Alain <ele### [at] netscape net> 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
|
![](/i/fill.gif) |