#內擺線(圓內旋輪線)
# python code is as follows:
import numpy as np
import matplotlib.pyplot as plt
R=1
i=1
t = np.linspace(0,10*np.pi,200)
x1=R*np.cos(t)
y1=R*np.sin(t)
plt.figure(figsize=(16,8),dpi=80)
for r in [0.3,0.6]:
x= (R-r)*np.cos(t)+r*np.cos((R-r)/r*t)
y= (R-r)*np.sin(t)-r*np.sin((R-r)/r*t)
plt.subplot(1,2,i)
i=i+1
plt.plot(x,y,color="red",linewidth=5)
plt.plot(x1,y1,color="green",linewidth=1)
plt.show()
# The output is as follows: