MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: help!! Plot3D of ellipsoid

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4943] Re: [mg4908] help!! Plot3D of ellipsoid
  • From: "Paul R. Wellin" <wellin>
  • Date: Mon, 7 Oct 1996 02:02:12 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

> 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

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: 217-398-0700
fax:   217-398-0747
email: wellin at wolfram.com

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: programming competition Correction
  • Next by Date: Integral over Spher. Harmon.
  • Previous by thread: help!! Plot3D of ellipsoid
  • Next by thread: Re: help!! Plot3D of ellipsoid