%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Composicion de dos MAS: Figuras de Lissajous
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%% DATA
A1=1;
A2=1;
omeg1=pi/3;
omeg2=pi/7;
%%%%%%%%%%%%%%%%%%%%%%
t=linspace(0,30,500);
x=A1*cos(omeg1*t);
y=A2*cos(omeg2*t);
%%%%%%%%% Figura unica simple %%%%%%%%%%%%
plot(x,y)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%  ANIMACION %%%%%%%%%%%%%%%%%%%%%
% axis([-1 1 -1 1]); %Fijo el marco en el que se va a mover el punto
% hold on %Ploteo sobre el mismo dibujo 
% for n=1:length(x)
%     %axis([-1 1 -1 1]);
%     plot(x(n),y(n),'ok') %Pinto el punto n de la trayectoria en negro
%     %hold on
%     pause(0.05) %mantengo la vision del punto un breve tiempo
%     plot(x(n),y(n),'ow') %Borro el punto para poder ver el siguiente
% end