Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python 3D visualization and graphics [closed]

Tags:

python

3d

graphic

I am looking for Python compatible 3D graphics. Mostly I would like to be able to draw lines and view them in 3D. I literally have no experience in this area and am looking for knowledge and tutorials.

I learn programming best by experimentation. So which packages do I need to do 3-D graphics? I really enjoy using emacs, so if you have those suggestions as well that would be awesome!

In summary:

  1. Which packages do I need for 3D graphics in python.
  2. Note that I use Ubuntu 12.04 LTS and emacs 24.3
like image 798
CodeKingPlusPlus Avatar asked Aug 02 '13 21:08

CodeKingPlusPlus


People also ask

Can Python do 3D graphics?

The easiest way for 3D visualization in Python is VPython. This is vastly easier than MayaVI, VTK, OpenGL, etc. Another easy option is matplotlib's 3D graphics. It's better on the quantitative details, but not as simple, fast, and interactive for the 3D part.

Does Python have built in graphics library?

Tkinter is one of Python's standard and easy-to-use Graphical User Interface (GUI) libraries that normally comes bundled with Python. There are many others with additional capabilities, platform support, and additional modern widgets.

Can pygame be used for 3D?

Pygame is not really designed for 3D graphics, so if you want to create a game with 3D graphics, you'd be better off using something else where all the basics, such as shading, are done automatically.


1 Answers

The easiest way for 3D visualization in Python is VPython.

For example, to draw a curve in the shape of a square, it's just:

square = curve(pos=[(0,0),(0,1),(1,1),(1,0),(0,0)]) 

This is vastly easier than MayaVI, VTK, OpenGL, etc.

Another easy option is matplotlib's 3D graphics. It's better on the quantitative details, but not as simple, fast, and interactive for the 3D part.

like image 183
tom10 Avatar answered Oct 01 '22 13:10

tom10