The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Re: [mg4908] help!! Plot3D of ellipsoid
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Keith S. Mersman

Posts: 10
Registered: 12/7/04
Re: [mg4908] help!! Plot3D of ellipsoid
Posted: Oct 9, 1996 2:07 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Fri, 4 Oct 1996, Seth wrote:

> I am trying to get a 3-d 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


The reason you're getting error messages is because your function z does
not have real values for the square {0,a}X{0,b}. It is only defined on an
elliptical region in that area. The syntax of Plot3D, however, designates
that it must be defined on a rectangular region. To get around this, you
can use modified spherical coordinates.
{xr_,[s_,t_],y[r_,s_,t_],z[r_,s_,t_]}={a r Sin[s] Cos[t], b r Sin[s]
Sin[t], c r Cos[s]}. Setting r equal to 1, you can verify that x^2/a^2 +
y^2/b^2 + z^2/c^2 = 1. Then you can use
ParametricPlot3D[{x[1,s,t],y[1,s,t],z[1,s,t]},{s,0,Pi},{t,0,2 Pi}]

to plot the ellipsoid.

Keith S. Mersman
Mathematica Consultant,
University of Missouri-Columbia

Mailbox: 220 Math Science Building
Office: GCB 124A
Office Phone: (573) 884-6771
Office Hours:
Sunday--6:00-10:00 p.m.
Monday--7:00-11:00 p.m.
Tuesday--6:00-6:30 p.m. and 8:30 to 10:00 p.m.
Wednesday--6:00-10:00 p.m.
Thursday--6:00-6:30 p.m. and 8:30 to 10:00 p.m.

e-mail address:

www address:

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.