有没有一种方法来绘制3D图元使用Python?方法来、Python

2023-09-07 23:30:46 作者:私人甜饼铺

我想在3D图绘制像球体,圆柱体和飞机(补丁)3D元,我也希望能够以交互方式旋转,平移和缩放现场。我想这样做,在Python。我使用使用Matplotlib的2D图形,但我从来没有与3D图形与Python。

I want to draw 3D primitives like spheres, cylinders and planes (patches) in a 3D plot and I would like to be able to interactively rotate, translate and zoom the scene. I want to do that in Python. I'm use to use Matplotlib for 2d graphs but I never worked with 3D graphics with Python.

有什么建议? 任何链接到教程? 任何想法?

Any suggestions? Any link to tutorials? Any ideas?

推荐答案

如果你已经习惯了matplotlib,然后 mplot3d 可能是一个很好的选择是否符合您的要求。

If you're used to matplotlib, then mplot3d is probably a good option if it meets your requirements.

另外还有 VPython 。这使您可以更自由地创建任意对象,并对其进行操作,但是,当然,多学习。

Alternatively there is VPython. This allows you greater freedom to create arbitrary objects and manipulate them, but, of course, more to learn.

 
精彩推荐
图片推荐