Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Draw 1/4-Ellipsoid on a 2D Surface
Date: Mon, 3 Dec 2007 14:48:49 +0000 (UTC)
Organization: Institut de Physique du Globe de Paris
Lines: 48
Message-ID: <fj150h$5cm$1@fred.mathworks.com>
References: <fj0njh$k8v$1@fred.mathworks.com> <fj137e$8t2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1196693329 5526 172.30.248.38 (3 Dec 2007 14:48:49 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 3 Dec 2007 14:48:49 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 845422
Xref: news.mathworks.com comp.soft-sys.matlab:440554



Thank you for your help. With little modifications I will get what I would like. 

Thanks !




"Mark Hoyle" <Mark.Hoyle@mathworks.co.uk> wrote in message 
<fj137e$8t2$1@fred.mathworks.com>...
> 
> "Antoine " <a.lucas@geolnet.net> wrote in message 
> news:fj0njh$k8v$1@fred.mathworks.com...
> > Hello World,
> >
> >
> >  I am looking for "drawing" a 2D surface (e.g. Z(x,y)) where in somewhere 
> > in this
> > surface, I would like to get a 1/4-ellipsoid shape.
> >
> > Starting with a space increment in X-axis and Y-axis, I would like to 
> > discretize
> > my half-ellipsoid equation and put it into my 2D surface as shown on 
fig.
> >
> > http://geologie.antwan.online.fr/fig-1.png
> >
> >
> > Thanks for your help
> >
> >
> >
> >
> >
> Try something like:
> 
> x = linspace(0,3,31);
> y = linspace(-2,2,31);
> [X,Y] = meshgrid(x,y);
> Z = max(real(sqrt(1-(X.^2)/3-(Y.^2)/2)),0);
> mesh(X,Y,Z)
> axis equal
> 
> 
> Mark
> 
>