clf
R=40;E=10;H=50;
J1=pi/2;J2=pi/2;J3=pi/2;J4=pi/2;
hold on
for J=0:pi/720:2*pi
S1=(H/2)*(1-cos(pi*J/J1));
S2=H;
S3=H-(H/2*(1-cos(pi*J/J3)));
S4=0;
if J>(k+2*pi-J4)
S=S4;
elseif J>(2*pi-J4-J3)&J<(2*pi-J4)
S=S3;
elseif J>(2*pi-J4-J3-J2)&J<(2*pi-J4-J3)
S=S2;
else
S=S1;
end
x=E*cos(J)+(sqrt(R*R-E*E)+S)*sin(J);
y=(sqrt(R*R-E*E)+S)*cos(J)-E*sin(J);
plot(x,y);
x1=R*cos(J);
y1=R*sin(J);
plot(x1,y1);
end
hold off
axis equal
怎么让这个图像旋转动起来,好像只能用rotate函数吧求高手