Question: Equation of a line (10)

Problem. write the equation of the line cut the two lines d1: x = 2*t, y= -t+1, z = t-2, d2: x = -1+2*m, y = 1+m, z = 3 and perpendicular to the plane 7*x+y-4*z=0. 

This is my code. 

> restart;with(geom3d):

with(LinearAlgebra):

a:=[2*t,-t+1,t-2]:

b:=[-1+2*m,1+m,3]:

line(d1,a,t):

line(d2,b,m):

plane(P,7*x+y-4*z=0,[x,y,z]):

a1:=convert(a,Vector):

a2:=convert(b,Vector):

v:=a1-a2:

n:=convert(NormalVector(P),Vector):

w:=CrossProduct(v,n):

sol:=solve([seq(w[i]=0,i=1..3)]);

coordinates(point(A,subs(sol[2],a))): #first way

coordinates(point(B,eval(b,sol[1]))): # second way

Equation(line(AB,[A,B],t));

 

Please comment to me. Thank you very much.

Please Wait...