Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Ellipsoid

Subject: Ellipsoid

From: Josef

Date: 10 Jul, 2009 07:40:03

Message: 1 of 2

Please could you help me when creating ellipsoid?
The ellipsoid should be represented only by ones. I know parametric equations:
a=10; b=8; c=6;
s=0:1:2*pi;
t=0:pi;
x=a*cos(s).sin(t);
y=b*cos(s).*sin(t);
z=c*cos(t) ;

the equation of ellipsoid is:
X.^2/a.^2+Y.^2/b.^2+Z.^2/c.^2)<=1

Now I do not know how to adjust the parrametric equations to the equation for the ellipsoid. In addition, I should implement the rotation of the ellipsoid by using Euler angle. If you are familiar with that I would appreciate it a lot.

Thank you!

 Josef

Subject: Ellipsoid

From: nor ki

Date: 10 Jul, 2009 08:44:02

Message: 2 of 2

"Josef " <jprokop@hotmail.com> wrote in message <h36r8j$80l$1@fred.mathworks.com>...
> Please could you help me when creating ellipsoid?
> The ellipsoid should be represented only by ones. I know parametric equations:
> a=10; b=8; c=6;
> s=0:1:2*pi;
> t=0:pi;
> x=a*cos(s).sin(t);
> y=b*cos(s).*sin(t);
> z=c*cos(t) ;
>
> the equation of ellipsoid is:
> X.^2/a.^2+Y.^2/b.^2+Z.^2/c.^2)<=1
>
> Now I do not know how to adjust the parrametric equations to the equation for the ellipsoid. In addition, I should implement the rotation of the ellipsoid by using Euler angle. If you are familiar with that I would appreciate it a lot.
>
> Thank you!
>
> Josef

Hi Josef,

you could scale the result of sphere

[X,Y,Z] = sphere(n);

and do the rotation with this matrix

http://www.mathworks.com/matlabcentral/fileexchange/23417

hth
kinor

Tags for this Thread

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.

Contact us