Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: [mg4908] help!! Plot3D of ellipsoid
Posted:
Oct 7, 1996 1:57 AM


> I am trying to get a 3d plot of an ellipsiod, of the equation > > (x^2/a^2) + (y^2/b^2) + (z^2/c^2) = 1 > > manipulating the equation I can get > > z = (c^2 (1 (x^2/a^2)  (y^2/b^2)))^1/2 > > then, with the constants defined, I write > > Plot3D[z,{x,0,a},{y,0,b}] > > Mathematica then spits out a bunch of errors
You will have to parametrize the surface. I'll leave the details to you, but with a bit of work, you can parametrize the ellipsoid as:
In[1]:= ellipsoid[u_,v_] := {a Cos[u] Cos[v], b Sin[u] Cos[v], c Sin[v]}
Then you can generate your surface as:
In[2]:= a = 1; b = 1; c = 2; ParametricPlot3D[ellipsoid[u, v], {u, 0, 2 Pi}, {v, Pi/2, Pi/2}]
Out[2]= Graphics3D
You can fiddle with the parameters to get stretch the ellipse in the x, y, or z directions.
 Paul Wellin Academic/Business Liaison Wolfram Research, Inc. 100 Trade Center Drive Champaign, IL 61820
phone: 2173980700 fax: 2173980747 email: wellin@wolfram.com



