In [ ]:
%matplotlib inline
from numpy import sin,cos,pi,linspace
from pylab import plot
# Play with these number and ignore the rest
R = 10
r = 0.4
O = 12
t = linspace(-pi,pi,3000)
x = (R+r)*cos(t) - (r+O)*cos(((R+r)/r)*t)
y = (R+r)*sin(t) - (r+O)*sin(((R+r)/r)*t)
plot(x,y)
In [ ]:
?linspace
In [ ]:
delta = pi/2
t = linspace(-pi,pi,300)
x = sin(3 * t + delta)
y = sin(5 * t)
plot(x,y)