Login and open two windows, one for editing and one for compiling
and executing programs. (
Try to reduce the browser size so that it won't occupy the whole
screen and you can observe a few things on the screen at the same time. )
Suppose a triangle is specified by the following three vertices:
P0 = ( 1, 2, 2 )
P1 = ( 6, 3, 2 )
P2 = ( 3, 5, 2 )
and a ray is given by
R(t) = ( 0, 0, 0 ) + t ( 2, 2, 1 ) / 3
Determine the following:
- The normalized normal to the plane containing the triangle
- The distance from the origin to the plane containing the triangle
- The intersection point of the ray and the plane containing the triangle
- Whether the ray hits the triangle