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
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com