numpy绘制利萨茹曲线
利萨茹曲线
参数方程定义:
![](https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D144/sign=cfca6be875094b36df921fe997cc7c00/8cb1cb13495409232333f6499158d109b3de49ab.jpg)
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()