[csu540-f05-rpf] [csu540-f05] SP3 question

Robert Futrelle futrelle at ccs.neu.edu
Tue Dec 6 18:12:34 EST 2005


Here's the answer to the question a number of you have asked me.

Q.  How do you get the coordinates of the point where the first ray 
hits a triangle?  (Needed because that's the new eyepoint for 
launching a ray in the direction of the light source.)

A. At the top of pg. 205, you see that the ray you start with has the form:
p = e + td, where p, e, and d are all points/vectors in 3-space. You 
know the values of p, e, and d.

When you hit a triangle, you can figure out the value of t.  You 
simply use that value in the equation for p and that gives you the 
point in 3-space where the ray hits the triangle.  So if T is the 
value of t where the first hit occurs, then that point is p = e + Td. 
That point becomes the new eyepoint, e', for launching the ray in the 
direction of the light, so e' = e + Td.

If L is a unit vector toward the light source, you can write your new ray as

p = e' + wL

using w instead of t, and L instead of d.

Hope this helps.

  - Prof. Futrelle



>I'll answer you in about an hour, soon as I get home.
>
>    rpf
>
>>I have a quick question. When you do the ray trace and your ray 
>>hits a point in a triangle, how do you get the z-coordinate of that 
>>point? I am having difficulties trying to ray trace back to the 
>>light source from a point on a triangle.
>>
>>Thanks.
>>
>>_______________________________________________
>>csu540-f05-rpf mailing list
>>csu540-f05-rpf at lists.ccs.neu.edu
>>https://lists.ccs.neu.edu/bin/listinfo/csu540-f05-rpf
>
>
>_______________________________________________
>csu540-f05-rpf mailing list
>csu540-f05-rpf at lists.ccs.neu.edu
>https://lists.ccs.neu.edu/bin/listinfo/csu540-f05-rpf




More information about the csu540-f05-rpf mailing list