Hello!
I am currently working on a program that requires the rotation of an ellipsoid in 3D space. Previous questions like this lead me to the "rotate" function where I could input an angle for the three axes. The issue is when I rotate about either the y or z axes, my ellipsoid turns 2D. When I rotate about both the y and z axes, the surface turns into a line. This rotation works fine around the x-axis.
Code Below:
% Get fz ellipsoid points
[ex,ey,ez] = ellipsoid(xc,yc,zc,foci2end,fzradius,fzradius);figure(1)hold all;% Fresnel Zone
fresnelzone = surf(ex,ey,ez); % Surface Plot
set(fresnelzone,'EdgeColor','none'); % Edge Color/Transparency Settings
set(fresnelzone,'FaceAlpha','.4');% Rotate Ellipsoid
rotate(fresnelzone,[1 0 0], angle_x);rotate(fresnelzone,[0 1 0], angle_y);rotate(fresnelzone,[0 0 1], angle_z);% Plot Label/View Settings
xlabel('X-axis'); ylabel('Y-axis');zlabel('Z-axis');view(3);
Thanks for any help!!
Best Answer