R1 = 9;
R2 = 13;
N = lcm(R1,R2);
t=[0:0.01:N*pi];
x = (R2-R1).*cos(t*R1/R2) + R1.*cos(-1*t);
y = (R2-R1).*sin(t*R1/R2) + R1.*sin(-1*t);
plot(x,y); hold on;
axis equal;
