Hi
I have fiddled around with other GUI's such as pygame and wxPython but i wanted to use something a little more powerful when it came to 3D objects and i saw what PyOpenGl can do. But i spent ages looking for any help but i couldn't find any place that had a beginners tutorial in PyOpenGl. I was wondering if anyone on DaniWeb knew where i could find some.
Thanks

Recommended Answers

All 5 Replies

I wouldn't go that way. OGL development and maintenace is pretty well dead.

If you are interested in 3D graphics take a look at VPython.

Is VPython good with 3D?

Description from the vpython homepage:

VPython is a package that includes:

  • the Python programming language
  • the IDLE interactive development environment
  • "Visual", a Python module that offers real-time 3D output, and is easily usable by novice programmers
  • "Numeric", a Python module for fast processing of arrays

VPython is free and open-source.

Here is a simple example ...

# a simple red cylinder in space
# press the right mouse button to rotate the object
# experiments with visual Python (VPython) from: http://vpython.org/
"""
pos of center of one end of the cylinder (x, y, z) default/center = (0,0,0)
axis points from pos to the other end of the cylinder (x, y, z) default = (1,0,0)
radius of the cylinder default = 1
length of axis, if not specified, axis determines the length default = 1
(if length is specified, overrides the length given by axis)
color (red, green, blue) color values 0.0 to 1.0 default/white = (1,1,1)
"""

import visual as vs

# (x, y, z) coordinates
cyl = vs.cylinder(pos=(-3, 2, 1), axis=(5, 0, 3), radius=3)

# (r, g, b) color values (0.0 to 1.0), red in this case
# or simply use vs.color.red
cyl.color = (1.0, 0, 0)

Thanks guys, i have started to learn it, i really like it. It is easy to understand and quite intuative. Thanks for pointing it out Vega.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.