[Edu-sig] Re: Teaching graphics with Python (was Introductoryhighschool programming)

Arthur ajsiegel at optonline.net
Sun Aug 1 16:21:05 CEST 2004



> -----Original Message-----
> From: Kirby Urner [mailto:urnerk at qwest.net]
> Sent: Sunday, August 01, 2004 3:23 AM
> To: 'Arthur'
> Subject: RE: [Edu-sig] Re: Teaching graphics with Python (was
> Introductoryhighschool programming)
> 
> > But getting it down to its essentials, the following runs, and provides
> a
> > sphere primitive that insists on being blue.
> >
> 
> Yes, you asked for blue.  VPython seems less able than VRML or OpenGL in
> general to support textures and like that.  Probably because it's
> *supposed*
> to be a simple API.

Yes.  I have missed transparency most particularly.  But David Scherer
explained to me early on that the naïve view I had that adding transparency
in VPython would only involve allowing access to the alpha channel in OpenGL
is mistaken.  To do it right, based on the way the cvisual code draws, there
is all kinds of depth testing necessary to add something like transparency
correctly.  And he wasn't interested in implementing it in a half-ass
manner.   

But obviously there are no limitations on what you can do in developing an
API for exporting VPython objects to Povray.  If you access the povexport
files at the vpython site, you will see an example of adding wood textures
in povray from Vpython.

But for your work, you can now simply add your developed povray export code
to objects you subclass from cvisual, so that you have the possibility of
modeling interactively in VPython, and exporting for more refined rendering
in povray in a manner fully under your control, and without re-inventing any
wheels. 

Art




More information about the Edu-sig mailing list