numpy绘制利萨茹曲线

利萨茹曲线

参数方程定义:

 

 

Key_Function

np.sin函数, 生成sin正弦函数

Code

import numpy as np
import matplotlib.pyplot as plt

a = 8
b = 9
t = np.linspace(-np.pi, np.pi, 201)
x = np.sin(a *t + np.pi/2)
y = np.sin(b * t)

plt.plot(x, y)
plt.show()

Code

import numpy as np
import matplotlib.pyplot as plt

a = np.sqrt(2)
b = 9
t = np.linspace(-np.pi, np.pi, 201)

x = np.sin(a * t + np.pi/2)
y = np.sin(b * t)

plt.plot(x, y)
plt.show()

 

猜你喜欢

转载自www.cnblogs.com/draven123/p/11403074.html