Plan og linjer 

 

Plan og Linjer 

> Plan([[x[0],y[0],z[0]],<a,b,c>],p);
 

`+`(`*`(a, `*`(`+`(x, `-`(x[0])))), `*`(b, `*`(`+`(y, `-`(y[0])))), `*`(c, `*`(`+`(z, `-`(z[0]))))) = 0
 

> P:=[4,-2,1]: Q:=[1,3,1]: R:=[2,1,2]:
 

> Plan([P,Q,R],graf);
 

 

> graf;
 

Plot_2d
 

> P,n:=[3,0,0],<7,8,12>:
 

> Plan([P,n],graf);
 

`+`(`*`(7, `*`(x)), `-`(21), `*`(8, `*`(y)), `*`(12, `*`(z))) = 0
 

> graf;
 

Plot_2d
 

> P:=[4,-2,1]: u:=<1,3,1>: v:=<0,1,2>:
 

> Plan([P,u,v],graf):
 

`+`(`*`(5, `*`(x)), `-`(25), `-`(`*`(2, `*`(y))), z) = 0
 

> graf;
 

Plot_2d
 

> p1,p2:=-x+y+z+2=0,-x+y+z+10=0:%;
 

`+`(`-`(x), y, z, 2) = 0, `+`(`-`(x), y, z, 10) = 0
 

> AvstandPlanPlan(p1,p2,axes=frame);
 

 

d = 4.61881
Plot_2d
 

> P,L:=[3,-1,2],[1+2*t,-4+5*t,3+t]:%;
 

[3, -1, 2], [`+`(1, `*`(2, `*`(t))), `+`(`-`(4), `*`(5, `*`(t))), `+`(3, t)]
 

> AvstandPunktLinje(P,L);
 

 

d = `+`(`*`(`/`(4, 5), `*`(`^`(5, `/`(1, 2)))))
Plot_2d
 

> restart:
 

> p,P:=-x+y+z+2=0,[3,4,6]:%;
 

`+`(`-`(x), y, z, 2) = 0, [3, 4, 6]
 

> AvstandPunktPlan(p,P);
 

 

d = 5.19615
Plot_2d
 

> L1:=[14+3*t,7+2*t,21+5*t]:%;
L2:=[5+3*s,15+5*s,10+7*s]:%;
 

 

[`+`(14, `*`(3, `*`(t))), `+`(7, `*`(2, `*`(t))), `+`(21, `*`(5, `*`(t)))]
[`+`(5, `*`(3, `*`(s))), `+`(15, `*`(5, `*`(s))), `+`(10, `*`(7, `*`(s)))]
 

> AvstandLinjeLinje(L1,L2);
 

 

d = 3.11137
Plot_2d