Is there a way to draw primitives in 3D with Python?

dom_beau picture dom_beau · Oct 3, 2012 · Viewed 16.2k times · Source

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?

Answer

deadly picture deadly · Oct 3, 2012

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

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