LinesAndPlanes.mw

Defining Lines as Parametric Equations 

 

Write the parametric equations for a line thru P=(1,2,3) parallel to the vector <3,4,5> 

Then define each parameter x(t), y(t), and z(t)  as a Maple function using the arrow (typed as the dash followed by the greater than sign ->) 

 

x := proc (t) options operator, arrow; 1+3*t end proc; 1 

proc (t) options operator, arrow; 1+3*t end proc 

y := proc (t) options operator, arrow; 2+4*t end proc; 1 

proc (t) options operator, arrow; 2+4*t end proc 

z := proc (t) options operator, arrow; 3+5*t end proc; 1 

proc (t) options operator, arrow; 3+5*t end proc 

with(plots); 1 

[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
 

Use the spacecurve(...) function to plot lines defined as parametric equations. 

 

spacecurve([x(t), y(t), z(t)], t = -5 .. 5, axes = normal, labels = (['x', 'y', 'z'])); 1
spacecurve([x(t), y(t), z(t)], t = -5 .. 5, axes = normal, labels = (['x', 'y', 'z'])); 1
spacecurve([x(t), y(t), z(t)], t = -5 .. 5, axes = normal, labels = (['x', 'y', 'z'])); 1
 

 

Plot 

 

 

Place the cursor over the plot and experiment by changing the orientation of the graph so you can see the line 

 

Now let's look at planes. First we need to load the linalg library 

 

with(linalg); 1 

[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
 

Find the equation of a plane through the 3 points A(0,0,1), B(2,0,0) and C(0,3,0) 

 

Find the normal vector to the plane by creating 2 vectors in the plane and taking their cross product 

 

AB := [2, 0, -1]; 1 

[2, 0, -1] 

AC := [0, 3, -1]; 1 

[0, 3, -1] 

N := crossprod(AB, AC); 1 

Vector[row](%id = 146706376) 

Now we can form the equation of the plane as N ยท v where v is a vector on the plane 

 

So we could define v as <x-0, y-0, z-1> where we have chosen point A to be a point on the plane 

 

V := [`+`(x, 0), `+`(y, 0), z-1]; 1 

[x, y, z-1] 

So our plane is 

 

PLANE := innerprod(N, V); 1 

3*x+2*y+6*z-6 

solve(PLANE = 0); 1 

{x = x, y = y, z = -1/2*x-1/3*y+1} 

which gives us the equation of the plane as the z variable, z = - x/2 - y/3 + 1 

 

Next we can use the implicitplot3d(...) command to plot the plane 

 

implicitplot3d(innerprod(N, V) = 0, x = -5 .. 5, y = -5 .. 5, z = -5 .. 5, axes = normal); 1
implicitplot3d(innerprod(N, V) = 0, x = -5 .. 5, y = -5 .. 5, z = -5 .. 5, axes = normal); 1
 

 

Plot 

 

Rotate the plot so you can see the plane