<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="1"/><View-Properties><Zoom percentage="100"/></View-Properties><Styles><Layout alignment="left" bullet="none" name="Normal"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="Maple Input" size="12"/><Font background="[0,0,0]" bold="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Text" opaque="false" size="12" underline="false"/></Styles><Group><Input><Text-field alignment="centred" layout="Normal" style="Text"><Font bold="true" size="18">Ray and Object Intersections: Plane</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/><Text-field alignment="centred" layout="Normal" style="Text">
by Otto Wilke
otto_wilke@hotmail.com</Text-field><Text-field layout="Normal" style="Text"/><Text-field layout="Normal" style="Text">I am vaguely aware that graphics is normally done with vector operations, generic</Text-field><Text-field layout="Normal" style="Text">solids positioned at the origin, and transformation matrices to move rays to and fro.</Text-field><Text-field layout="Normal" style="Text"/><Text-field layout="Normal" style="Text">I thought it would be interesting to use rectangular coordinates and objects located</Text-field><Text-field layout="Normal" style="Text">anywhere in space and oriented in any direction.</Text-field><Text-field layout="Normal" style="Text"/><Text-field layout="Normal" style="Text">This is one of four files covering the plane, the sphere, the cylinder, and the cone. </Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">INTERSECTION OF A LINE AND A PLANE</Text-field><Text-field layout="Normal" style="Text">The general equation of a plane is</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">A*x+B*y+C*z+D=0;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">After division by D, and redefining A, B, and C</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">A*x+B*y+C*z+1=0;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Any three points define a plane.  Using the points (1,5,-4), (1,1,-2), and (8,1,-2), solve</Text-field><Text-field layout="Normal" style="Text">three simultaneous equations for A, B, and C.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">solve({A+5*B-4*C+1=0,A+B-2*C+1=0,8*A+B-2*C+1=0},{A,B,C});</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">For the three points,</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">y/3+2*z/3+1=0;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">or,</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">y+2*z+3=0;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">If a line L with direction numbers A, B, and C is normal to a plane P, then P has the form</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">A*x+B*y+C*z+D=0;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">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.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Input><Text-field layout="Normal" style="Text">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</Text-field><Text-field layout="Normal" style="Text">direction numbers of L.  The line L on the point P1 and with direction numbers A, B, and C has parametric equations</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">x = x1 + A*t; y=y1+B*t;z=z1+C*t;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">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</Text-field><Text-field layout="Normal" style="Text">direction numbers of L.  The line L on the point P1 and with direction numbers a, b, and c has parametric equations</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">x = x1 + a*t; y=y1+b*t;z=z1+c*t;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">To find the intersection of a line and a plane, solve the simultaneous equations for x, y, z, and t.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">A*x+B*y+C*z+D=0;x = x1 + a*t; y=y1+b*t;z=z1+c*t;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">solve({x = x1 + a*t, y=y1+b*t,z=z1+c*t,A*x+B*y+C*z+D=0},{x,y,z,t});</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">For the plane above, and a line through the origin and having direction numbers (1, -1, 2)</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">solve({x=0+1*t , y=0-1*t , z=0+2*t , y+2*z+3=0},{x,y,z,t});</Text-field></Input><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">with(plots):</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">plot1:=implicitplot3d(y+2*z+3=0,x=-3..3,y=-3..3,z=-3..3):</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">plot2 := arrow(&lt;0,0,0&gt;, &lt;-1,1,-2&gt;, difference, color=red):</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">display({plot1,plot2});</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field/><Text-field/><Text-field/><Text-field/><Text-field/></Worksheet>