Search code examples
python3dpython-2.7kde-plasma

Is there a way to draw primitives in 3D with 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?


Solution

  • 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.