[Edu-sig] re: 3d in Python

Arthur ajsiegel@optonline.net
Sat, 26 Apr 2003 09:43:57 -0400


Dethe Elza wrote:

> Yes, my wish list for VPython is:
> * Runs native on OS X (instead of in X Windows)
> * Transparency (alpha channel)
> * Textures
> * Built as part of PyOpenGL, so I can embed it in wxWindows, GLUT, etc.

Textures and transparency have been discussed a lot on the list.  David 
Scherer has explained to
me at least twice why the transparency issue is a lot more complicated 
than adding an alpha
channel to the  glColor calls in the C code.  Depth cuing, or something. 
 I of course don't
fully get it.  

There are, finally, some specific plans to bring VPython forward and add 
new features.
I understand the first step will be a port from CXX to Boost.  

"Built as part of PyOpenGL" kind of scares me, because it somehow 
implies to me the possibility
of losing VPythons immediacy at the interactive prompt.  There is 
actually *no* windowing code
necessary in VPython.  sphere() not only creates the sphere, but its 
display context.  The creation of
additional objects will proceed on that same display, until a new 
display window is explicitly created.

> Yes, but it would be easier if I had a better idea what you're trying 
> to accomplish. 

Ideally, try before you buy. In some way, shape or form.

For those outside the Python orbit, the the concept of the dependencies 
of something like VPython seems
daunting. Seems to me that folks want to understand the functionality 
beyond what screenshots can provide,
before they commit to the effort.

Telling them that VPython is "3d for mortals" is one thing.  Showing 
them, another.

> Yes.  Somewhat easier if you use GLUT (a cross-platform windowing 
> toolkit for OpenGL), but still pretty hairy.  I mentioned 
> OpenGLContext because it is supposed to be a friendlier environment.  
> It features windowing using wxWindows, GLUT, Tkinter, etc., for one 
> thing, and I believe it is object-oriented, for another.  But I 
> haven't really explored it much. 

I had the pleasure of talking with Mike Fletcher, who I think is doing 
most of the OpenGLContext work, at PyCon.

But even before OpenGLContext, there was a pre-built Tkinter default 
display context, that provided simple mouse interactivity,
and that became available by a simple import statement.  It is actually 
a good intro to OOP, as one begins to understand that
inheriting from and overriding a method or 2 in the default display 
context is how one draws one's own OpenGL construction.

> Yes, the only reason to use one of those is if it gives you something 
> you need that you can't get from VPython.   If VPython is sufficient, 
> but you just want to hook it up to the network, that should be 
> relatively straightforward.  I'd be happy to help, if you can supply 
> another level of detail.


VPython is sufficient, and will hopefully become *more* sufficient over 
time.  

What would you suggest as a starting point for some experimentation for 
a remotely accessed VPython - which something other than a
telnet type session?

Art