我已经在2D绘图中绘制了一个圆,但现在我想在3D绘图中绘制同一个圆(即绘制半径和中心已知的球体)
import matplotlib.pyplot as plt
x = 50
y = 50
radius = 10
#The x and y values are examples. They are pre-defined in the original program.
fig, px = plt.subplots(1)
plt.xlim(100)
plt.ylim(100)
circle1 = plt.Circle((x,y), radius, color="r")
px.set_aspect(1)
px.add_artist(circle1)
plt.show()
以下是一种将球体参数化曲面绘制为线框的方法:
相关问题 更多 >
编程相关推荐