阿基米德螺旋线

阿基米德螺旋线,rho=a+b*theta,画了一个图:

import numpy as np
import matplotlib.pyplot as plt

plt.style.use('ggplot')
a, b = 2.0, 2.0
n = 6
theta = np.linspace(0, 2 * np.pi, num=2000)
plt.subplot(111, projection='polar')
y = a + b * theta
for i in range(n):
    x = theta + 2.0 * np.pi * i / n
    plt.plot(x, y)
plt.plot(theta, [a] * len(theta))
plt.show()


阿基米德螺旋线_第1张图片

你可能感兴趣的:(阿基米德螺旋线)