% Rotations of the circle 

clear 
clc 
figure(1)
clf
set(gcf,'Color',[1,1,1])
axis equal; axis off

% Parameters 

alpha = pi/2;          % rotation angle 
N = 7;      % number of iterations
angle = 0.2; % initial condition

% compute the trajectory and then the point in the circle

for n=1:N
    hold on 
 x(n) = cos(2*pi*(alpha*n+angle));
 y(n) = sin(2*pi*(alpha*n+angle)); 
end

% drow the orbit in the x-y plane 
hold on; 
%title('\bf Circle rotations','FontSize',10 ); 
scatter(x,y,3,[0.9,0.1,0.1]);   
plot(x,y); % plot the different points 
circle(0,0,1);
% captions 
captions=text(min(x),1.1*max(y),['Orbit inside a circular billard, angle x = ',num2str(alpha),' up to time N = ',num2str(N)]); 
set(captions,'FontSize',12);
