这个是别人的
close all; clear;
x=linspace(0,2*pi);
% n=100;
% t=0:2*pi/n:2*pi;
for k=1:length(x)
clf; hold on;
plot(cos(x),sin(x));
%FEST KREIS
plot(2*cos(k)-cos(x),2*sin(k)-sin(x));
%DREH KREIS
hold on;
plot(2*(1-cos(x(1:k))).*cos(x(1:k))+1,2*(1-cos(x(1:k))).*sin(x(1:k)),'r','LineWidth',4);
%HERZ LINE
plot(2*(1-cos(x)).*cos(x)+1,2*(1-cos(x)).*sin(x));
%HERZ LINE
plot(2*(1-cos(k)).*cos(k)+1,2*(1-cos(k)).*sin(k),'-ko','LineWidth',2,...
'MarkerEdgeColor','k', 'MarkerSize',5,'MarkerFaceColor','w');
% plot(2*cos(k)-cos(2*(k)),2*sin(k)-sin(2*(k)));
axis equal;
F(k)=getframe;
end
clf; axis off;
movie(F,20)
这个是我的