Lines, Planes, and Quadric Surfaces

We can plot planes with implicitplot from the draw package.

First let us define the plane with equation

\begin{displaymath}
3x + 4y + 5z = 0.
\end{displaymath}

We store the equation of the plane in the variable plane1.


\begin{maximasession}
plane1: 3*x + 4*y + 5*z = 0;
load(draw);
draw3d(enhanced3d...
...eft[ \mathrm{gr3d}\left(\mathrm{implicit}\right) \right] \\
\end{maximasession}

Figure 1: A plot of a plane
\includegraphics{plane1.eps}

Let us next plot an ellipsoid with equation

\begin{displaymath}
\frac{x^2}{3} + y^2 + z^2 = 3.
\end{displaymath}

We plot it just like we plot the plane.


\begin{maximasession}
ellips1: x^2/3 + y^2 + z^2 = 3;
draw3d(enhanced3d = true, ...
...eft[ \mathrm{gr3d}\left(\mathrm{implicit}\right) \right] \\
\end{maximasession}

Figure 2: A plot of an ellipsoid
\includegraphics{ellips1.eps}

We can also use Maxima to help us find an equation of a plane based on defining vectors. For instance, let's find and plot the plane determined by the points $A(1,1,1)$, $B(1,2,3)$, and $C(0,0,0)$.

First we define the position vectors for the three defining points.
\begin{maximasession}
a: [1, 1, 1];
b: [1, 2, 3];
c: [0, 0, 0];
\maximaoutput*
\...
...\\
\i8. c: [0, 0, 0]; \\
\o8. \left[ 0 , 0 , 0 \right] \\
\end{maximasession}

Next, we find the vectors from $A$ to $B$, and $A$ to $C$.


\begin{maximasession}
ab: b - a;
ac: c - a;
\maximaoutput*
\i9. ab: b - a; \\
\...
...
\i10. ac: c - a; \\
\o10. \left[ -1 , -1 , -1 \right] \\
\end{maximasession}

Then, we find the normal vector to the plane. (Recall that we need the vect package to do cross products.)


\begin{maximasession}
load(vect);
n: express(ab  ac);
\maximaoutput*
\i11. load...
...n: express(ab  ac); \\
\o12. \left[ 1 , -2 , 1 \right] \\
\end{maximasession}

Finally, we set up the defining equation of the plane, which takes the form

\begin{displaymath}
\mathbf{n}\cdot\mathbf{r} = \mathbf{n}\cdot\mathbf{r_0}.
\end{displaymath}


\begin{maximasession}
r: [x, y, z];
r0: a;
plane: n . r = n . r0;
\maximaoutput*...
...t] \\
\i15. plane: n . r = n . r0; \\
\o15. z-2 y+x=0 \\
\end{maximasession}

The only remaining task is to make the plot. See Figure BLANK.


\begin{maximasession}
draw3d(enhanced3d = true,implicit(plane,x,-4,4,y,-4,4,z,-4...
...eft[ \mathrm{gr3d}\left(\mathrm{implicit}\right) \right] \\
\end{maximasession}

Figure 3: Another plot of a plane
\includegraphics{plane.eps}

We can do more exotic plots, like cones. Let's do a standard cone with equation

\begin{displaymath}
x^2 + y^2 = z^2
\end{displaymath}


\begin{maximasession}
cone: x^2 + y^2 = z^2;
draw3d(enhanced3d = true, implicit...
...eft[ \mathrm{gr3d}\left(\mathrm{implicit}\right) \right] \\
\end{maximasession}

Figure 4: A plot of a cone
\includegraphics{cone.eps}

See Figure BLANK. See how the center of the cone looks distorted? It is because we are plotting the cone in rectangular coordinates. We get a much better plot with spherical coordinates. More on that later.

Let's next try a hyperboloid with equation

\begin{displaymath}
x^2 + y^2 - z^2 = 1
\end{displaymath}

See Figure BLANK.


\begin{maximasession}
hyperboloid: x^2 + y^2 - z^2 = 1;
draw3d(enhanced3d = tru...
...eft[ \mathrm{gr3d}\left(\mathrm{implicit}\right) \right] \\
\end{maximasession}

Figure 5: A plot of a hyperboloid
\includegraphics{hyperboloid.eps}

And we can do a hyperboloid of two sheets, with the equation

\begin{displaymath}
-x^2 - y^2 + z^2 = 1.
\end{displaymath}

See Figure BLANK.


\begin{maximasession}
hyprbld2: -x^2 - y^2 + z^2 = 1;
draw3d(enhanced3d = true,...
...eft[ \mathrm{gr3d}\left(\mathrm{implicit}\right) \right] \\
\end{maximasession}

Figure 6: Another plot of a hyperboloid
\includegraphics{hyperboloid2.eps}



G. Jay Kerns 2009-12-01