Re: help!! Plot3D of ellipsoid

• To: mathgroup at smc.vnet.net
• Subject: [mg4963] Re: [mg4908] help!! Plot3D of ellipsoid
• From: "Keith S. Mersman" <c621746 at everest.cclabs.missouri.edu>
• Date: Thu, 17 Oct 1996 00:40:46 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```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
>
>
>
Seth,

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.

mersman at everest.cclabs.missouri.edu

c621746 at showme.missouri.edu

http://www.phlab.missouri.edu/~mersman
and
http://www.missouri.edu/~c621746
======================================================

```

• Prev by Date: queries on new 3.0?
• Next by Date: ts ts ts
• Previous by thread: Re: help!! Plot3D of ellipsoid
• Next by thread: How to display Conjugate[z] as z*?