Ray and Object Intersections: Plane
by Otto Wilke otto_wilke@hotmail.com
I am vaguely aware that graphics is normally done with vector operations, generic
solids positioned at the origin, and transformation matrices to move rays to and fro.
I thought it would be interesting to use rectangular coordinates and objects located
anywhere in space and oriented in any direction.
This is one of four files covering the plane, the sphere, the cylinder, and the cone.
INTERSECTION OF A LINE AND A PLANE
The general equation of a plane is
After division by D, and redefining A, B, and C
Any three points define a plane. Using the points (1,5,-4), (1,1,-2), and (8,1,-2), solve
three simultaneous equations for A, B, and C.
For the three points,
or,
If a line L with direction numbers A, B, and C is normal to a plane P, then P has the form
Any multiple of 0*x+1*y+2*x+3=0 would give the A, B, C, and D for a line perpendicular to the plane above.
If P1(x1,y1,z1) and P2(x2,y2,z2) are two points on a line L, then A=(x2-x1), B=(y2-y1), and C=(z2-z1) are
direction numbers of L. The line L on the point P1 and with direction numbers A, B, and C has parametric equations
If P1(x1,y1,z1) and P2(x2,y2,z2) are two points on a line L, not necessarily perpendicular to a particular plane P, then a=(x2-x1), b=(y2-y1), and c=(z2-z1) are
direction numbers of L. The line L on the point P1 and with direction numbers a, b, and c has parametric equations
To find the intersection of a line and a plane, solve the simultaneous equations for x, y, z, and t.
For the plane above, and a line through the origin and having direction numbers (1, -1, 2)