I'm trying to solve this problems:
Build the surf plot of the ellipsoid when a=1
, b=1
.5, c=2
with:
z = c*(1-(x^2)/(a^2)-(y^2)/(b^2))^0.5;
Use the coordinate transformation when (0a and b
and 22 values of t
.
x=a*cos(t);
y=b*sin(t);
I'm trying to solve this problems:
Build the surf plot of the ellipsoid when a=1
, b=1
.5, c=2
with:
z = c*(1-(x^2)/(a^2)-(y^2)/(b^2))^0.5;
Use the coordinate transformation when (0a and b
and 22 values of t
.
x=a*cos(t);
y=b*sin(t);
a = 1;
b = 0.5;
c = 2;
t = linspace(0,2*pi,22);
p = linspace(0,pi,22);
[T,P] = meshgrid(t,p);
x = a*cos(T).*cos(P);
y = b*cos(T).*sin(P);
z = c*sin(T);
figure,surf(x,y,z)
This solution uses the parameterization for the ellipsoid. 0<=t<=2*pi
and 0<=p<=pi
x = acos(t)cos(p)
y = bcos(t)sin(p)
z = cos(t)