Thread Subject: Draw 1/4-Ellipsoid on a 2D Surface

Subject: Draw 1/4-Ellipsoid on a 2D Surface

From: Antoine

Date: 3 Dec, 2007 11:00:01

Message: 1 of 3

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

Subject: Draw 1/4-Ellipsoid on a 2D Surface

From: Mark Hoyle

Date: 3 Dec, 2007 14:18:21

Message: 2 of 3


"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

Subject: Draw 1/4-Ellipsoid on a 2D Surface

From: Antoine

Date: 3 Dec, 2007 14:48:49

Message: 3 of 3

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
>
>

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com