Re: Teaching graphics with Python (was Introductoryhighschool programming)

I wanted to thank you for this stereoscopic feature in VPython, and suggestion that I use it.
Just thought I'd mention that VPython 3.0 has been released last week. This version is mostly a behind the scenes revamp of the code. VPython now uses the Boost Python library to expose Vpython's cvisual C++ code to Python. Among other things this allows one to directly subclass cvisual primitives in pure Python. Currently this is an undocumented facility as to VPython. But getting it down to its essentials, the following runs, and provides a sphere primitive that insists on being blue. import cvisual import time import atexit def __waitclose(): while not cvisual.allclosed(): time.sleep(0.05) atexit.register(__waitclose) scene = cvisual.display() class sphere (cvisual.sphere): def __init__( self,*args,**keywords): cvisual.sphere.__init__(self) self.color=(0,0,1) self.complete_init( self, self, 1, scene, None) s=sphere() Seems to me this facility will open up interesting new possibilities in having fun with VPython/cvisual. PyGeo for example could now decide to more truly wrap the cvisual library, as opposed to using it - through Vpython - as a rendering back-end.
My slides are here: http://www.4dsolutions.net/oscon2004/ (might be some minor problems if viewed in Windows, not sure (tried to make it work well in both, but kept finding little discrepancies going back and forth, and did all last minute editing on the Linux side)).
Looks super. Art

I had written.
My slides are here: http://www.4dsolutions.net/oscon2004/ (might be some minor problems if viewed in Windows, not sure (tried to make it work well in both, but kept finding little discrepancies going back and forth, and did all last minute editing on the Linux side)).
Looks super.
Let me release my ego again, which I think I have successfully kept under control for 3 or 4 posts, running. If you synthesize your 2 major thrusts - Math through programming Graphics through programming perhaps you come to something not far off from what PyGeo attempts. ...whether PyGeo is at all successful in achieving what it attempts being a whole separate matter. I am not fully sure myself, that it does. But I do appreciate your mention of it in your talks. Art
participants (1)
-
Arthur