Plotting a 3D graph from explicit equation

743 Views Asked by At

I´m a 2nd year engineering student and today we learned how to plot 3d graphs from a $XYZ$ equation on paper.

For example, I know ($\frac{X^2}{9}+ \frac{Y^2}{16} + \frac{Z^2}{9} =1$) will produce an ellipsoid. I understand very well how to get the traces (XY XZ YZ planes) individually, and how to plot it.

However, I´m a little confused on how to do this on software, since most of the stuff available online assumes your input function will be either parametric or cartesian, in the form $Z = aX^2 + bY^2...$ but there is no option to put a power on the z variable anywhere.

Given that what I have is an equation (not a function), how would you translate such format (equation) so plotting software will understand its syntax?

2

There are 2 best solutions below

0
On

You could solve for $Z$ to get two solutions, $$Z=\sqrt{9\Bigl(1-\frac{X^2}9-\frac{Y^2}{16}\Bigr)}\quad\hbox{or}\quad Z=-\sqrt{9\Bigl(1-\frac{X^2}9-\frac{Y^2}{16}\Bigr)}$$ and then plot each part separately. IMHO a better option would be to obtain some different software :) For example, Maple will quite happily accept your original equation and give you a nice 3D plot.

0
On

Wolfram|Alpha does this very easily, for example:

ContourPlot3D[x y^2 + 3 x^2 z + z^3 y == 1, {x,-3,3}, {y,-3,3}, {z,-3,3}]

gives a rather nice picture.