Planes, lines and points Assume you have a plane defined by P1, P2, P3 P1( x1=2.1 yy1=5.5 zz1= 4.3 ) P2( x2=1.2 yy2=1.53 zz2= 2.54 ) P1( x3=3.9 yy3=3.5 zz3= 9.2 ) Plane xyz = a*x+b*y+c*z+d=0 | yy1 zz1 1 | | x1 zz1 1 | | x1 yy1 1 | a= | yy2 zz2 1 | b= -| x2 zz2 1 | c= | x2 yy2 1 | | yy3 zz3 1 | | x3 zz3 1 | | x3 yy3 1 | d= -(a*x1+b*yy1+c*zz1) a = -22.973 b = 1.242 c = 9.946 d = 2.29445 [ (x1-x3), (yy1-yy3), (zz1-zz3)] =| s1 | [ (x2-x3), (yy2-yy3), (zz2-zz3)] =| s2 | [ (x4-x3), (yy4-yy3), (zz4-zz3)] =| s3 | | s1 | dot | s2 | = 33.55 | s1 | dot | s2 |/(abs(s1)*abs(s2)) = t7 = 0.8055 cos(t8)=t7 t8=36.34 degrees assume x4=5 s1 dot s3 = 0 s2 dot s3 = 0 solve for y3 and y4 yy4=3.441 zz4= 8.772 Find distance P4 to plane abs(a*x4+b*yy4+c*zz4+d)/sqrt(a^2+b^2+c^2) = g = 1.182 sqrt( (x4-x3)^2+(yy4-yy3)^2+(zz4-zz3)^2) = g Given a,b,c,d and x4, yy4, zz4, find P3 l = (x3-x4)/g = l = -0.9307 m = (yy3-yy4)/g = m = -0.0503 n = (zz3-zz4)/g = n = -0.3624 x3=g * l + x4 y3=g * m + yy4 z3=g * n + zz4 ========= TI-89 program sqrt is square root symbol |> is right triangle :cos-1( ) is inverse cos :zz() :Prgm :ClrIO :setMode("Angle","Degree") :setMode("DisplayDigits","Float 4") :setMode("Exact/Approx","Approximate") ;DelVar yy4,zz4 :2.1->x1 :5.5->yy1 :4.3->zz1 :1.2->x2 :1.53->yy2 :2.54->zz2 :3.9->x3 :3.5->yy3 :9.2->zz3 :5->x4 :[[yy1,zz1,1][yy2,zz2,1][yy3,zz3,1]]->t1 :[[x1, zz1,1][x2, zz2,1][x3, zz3,1]]->t2 :[[x1, yy1,1][x2, yy2,1][x3, yy3,1]]->t3 :det(t1)->a :-det(t2)->b :det(t3)->c :a*x1+b*yy1+c*zz1->t :-t->d :Disp "Plane" :Disp "a,b",{a,b} :Disp "c,d",{c,d} :Pause :ClrIO :[[x1-x3,yy1-yy3,zz1-zz3]]->s1 :[[x2-x3,yy2-yy3,zz2-zz3]]->s2 :[[x4-x3,yy4-yy3,zz4-zz3]]->s3 :det(subMat(s1,1,1,1,1))->t1 :det(subMat(s1,1,2,1,2))->t2 :det(subMat(s1,1,3,1,3))->t3 :sqrt(t1^2+t2^2+t3^2)->t4 :det(subMat(s2,1,1,1,1))->t1 :det(subMat(s2,1,2,1,2))->t2 :det(subMat(s2,1,3,1,3))->t3 :sqrt(t1^2+t2^2+t3^2)->t5 :dotP(s1,s2)->t6 :t6/(t4*t5)->t7 :cos-1(t7)->t8 :Disp "t8 angle",t8 :Pause :ClrIO :cross(s1,s2)->t9 :Disp "t9",t9 :Pause :ClrIO :sqrt(a^2+b^2+c^2)->t10 :DelVar x,y,z :[[x ,y, z][x1 ,yy1,zz1,1][x2 ,yy2,zz2,1][x3 ,yy3,zz3,1]->tt :Disp "tt",tt :Pause :ClrIO :det(tt)->ttt :expand(ttt)->te :Disp "te",te :Pause :ClrIO :dotP(s1,s3)->xz9 :dotP(s2,s3)->xz10 :solve(xz9=0 and xz10=0,{yy4,zz4})->t33 :exp|>list(t33),{yy4,zz4})->tz :subMat(tz,1,1,1,1)->ty :det(ty)->yy4 :subMat(tz,1,2,1,2)->ty :det(ty)->zz4 :Disp "x4,yy4,zz4",{x4,yy4,zz4} :Pause :ClrIO :sqrt( (x4-x3)^2 + (yy4-yy3)^2 + (zz4-zz3)^2)->g :Disp "g point to plane",g :(x4 -x3 )/g->l :(yy4-yy3)/g->m :(zz4-zz3)/g->n :Disp "l,m,n direction",{l,m,n} :EndPrgm