[Edu-sig] re: 3d in Python

Dethe Elza delza@blastradius.com
Fri, 25 Apr 2003 20:11:57 -0700


Arthur wrote:

> Dethe asks:
>
>> Is there any reason you can't drive VPython with XML-RPC?  Why do you 
>> need SVG?
>
> That's really the question I am tryin to get to - is that a possiblity 
> worth investigating.
> VPython is all the 3d functionality I really require - though there is 
> always a wish list.

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.

> But XML-RPC is little more than an acronym to me at this point.  *If I 
> knew, or at least had reason to believe, that I could in fact drive 
> VPython remotely
> with XML-RPC, I'd dig in.

XML-RPC is just one of a plethora of ways to connect programs over the 
net. There's a full-featured toolkit for building network-savvy 
programs in Python, called Twisted[1], but it may be overkill for what 
you want.  XML-RPC is pretty simple, and you don't have to know much to 
use it.  There was even a new version released today[2] which is 
supposed to be 10 times faster (implemented in C, with Python bindings).

> Can I take you post as an opinion that there is something to be done 
> along these lines?

I can't think of a reason why not.

> Can you describe how it might be configured/architected - in very, 
> very broad terms?

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

> Most of the other tools you refer to, I am familiar with.
> It was actually through PyOpenGL that I became aware of and involved 
> with using Python.
> My interest was in learning to work with the OpenGL API without wading 
> through all kinds
> of windowing APIs to get there.  The insanity one needs to go through 
> to get a Windows
> window prepared for an OpenGL dot, is almost funny.  Anti-intuitive is 
> an understatment.

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.

> The code, to me, looks like a random letter generator at work.
> Most of the other apps and APIs you reference are overkill for my 
> needs. VTK is awesome, but considerably more than I require.

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.

> Art

[1] Twisted Network Framework
http://www.twistedmatrix.com/

[2] Py-xmlrpc 0.8.8.3 released
http://sourceforge.net/forum/forum.php?forum_id=270940

--Dethe