1.圆的参数方程表示形式
Python代码:
import numpy as np
import matplotlib.pyplot as plt
# 1.圆半径
r = 2.0
# 2.圆心坐标
a, b = (0., 0.)
# 参数方程
theta = np.arange(0, 2*np.pi, 0.01)
x = a + r * np.cos(theta)
y = b + r * np.sin(theta)
#绘图
fig = plt.figure()
axes = fig.add_subplot(111)
axes.plot(x, y)
axes.axis('equal')
plt.show()
绘图结果:
最后
以上就是从容魔镜最近收集整理的关于Python利用参数方程画圆的全部内容,更多相关Python利用参数方程画圆内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复