close all f=figure; set(f,'Position',[0 0 1024 680],'Color',[1 1 1], 'MenuBar', 'none') t=0:.01:2*pi + .5; subplot(1,3,1) plot(0,0,'b*','LineWidth',14) plot(cos(t),sin(t),'LineWidth',2) hold on axis([-2.7000 1.2000 -5.7902 4.1288]) axis off plot(cos(t)-1.5,sin(t),'r','LineWidth',2) plot(cos(t)-.75,sin(t)-sqrt(7/16)-1,'g','LineWidth',2) plot(0,0,'b*','LineWidth',10) plot(-1.5,0,'r*','LineWidth',10) plot(-.75,-sqrt(7/16)-1,'g*','LineWidth',10) title('Reloj en hora', 'FontSize',18) pause subplot(1,3,2) c21=plot(1.2*cos(t),1.2*sin(t),'LineWidth',2); hold on axis([-2.7000 1.2000 -5.7902 4.1288]) axis off c22=plot(1.2*cos(t)-1.5,1.2*sin(t),'r','LineWidth',2); c23=plot(1.2*cos(t)-.75,1.2*sin(t)-sqrt(7/16)-1,'g','LineWidth',2); plot(0,0,'b*','LineWidth',10); plot(-1.5,0,'r*','LineWidth',10); plot(-.75,-sqrt(7/16)-1,'g*','LineWidth',10); title('Reloj adelantado','FontSize',18) pause subplot(1,3,3) c31=plot(.8*cos(t),.8*sin(t),'LineWidth',2); hold on axis([-2.7000 1.2000 -5.7902 4.1288]) axis off c32=plot(0.8*cos(t)-1.5,0.8*sin(t),'r','LineWidth',2); c33=plot(0.8*cos(t)-.75,0.8*sin(t)-sqrt(7/16)-1,'g','LineWidth',2); plot(0,0,'b*','LineWidth',10) plot(-1.5,0,'r*','LineWidth',10) plot(-.75,-sqrt(7/16)-1,'g*','LineWidth',10) title('Reloj atrasado','FontSize',18) pause repeticiones=20; subplot(1,3,2) title('Ajustando el Reloj','Color','r','FontSize',20); for i=1:repeticiones set([c21 c22 c23],'Visible','off') c21=plot(((1.2-1)*(1-i/repeticiones) + 1)*cos(t),((1.2-1)*(1-i/repeticiones) + 1)*sin(t),'LineWidth',2); c22=plot(((1.2-1)*(1-i/repeticiones) + 1)*cos(t)-1.5,((1.2-1)*(1-i/repeticiones) + 1)*sin(t),'r','LineWidth',2); c23=plot(((1.2-1)*(1-i/repeticiones) + 1)*cos(t)-.75,((1.2-1)*(1-i/repeticiones) + 1)*sin(t)-sqrt(7/16)-1,'g','LineWidth',2); pause(.1) end title('Reloj en hora','Color','b','FontSize',20); pause subplot(1,3,3) title('Ajustando el Reloj','Color','r','FontSize',20); for i=1:repeticiones set([c31 c32 c33],'Visible','off') c31=plot(((1-.8)*(i/repeticiones) + .8)*cos(t),((1-.8)*(i/repeticiones) + .8)*sin(t),'LineWidth',2); c32=plot(((1-.8)*(i/repeticiones) + .8)*cos(t)-1.5,((1-.8)*(i/repeticiones) + .8)*sin(t),'r','LineWidth',2); c33=plot(((1-.8)*(i/repeticiones) + .8)*cos(t)-.75,((1-.8)*(i/repeticiones) + .8)*sin(t)-sqrt(7/16)-1,'g','LineWidth',2); pause(.1) end title('Reloj en hora','Color','b','FontSize',20);