[Edu-sig] Re: Teaching graphics with Python (was Introductory high school programming)

John Zelle john.zelle at wartburg.edu
Sat May 8 13:56:11 EDT 2004

Just a quick comment to Kirby's latest post.

Kirby Urner wrote:

>I'm finally making the time to work with VPython again.  My previous high on
>that score was reading Arthur's Pygeo code (many versions ago) and trying to
>see how it all worked.  These days, I'm just adapting what I've used to
>output to POV-Ray, and a lot of the same code over top.
For those of you working with VPython, if you've not tried it out yet, 
take a look at the stereoscopic mode. I contributed the main code for 
this in the fall of 2003. It's a spin-off from some VR work I've been 
doing with my students. The stereo mode allows you to take virtually any 
VPython program and turn it into true stereographic 3D. You can make the 
objects seem to jump right out of the screen at you. The stereo graphics 
are viewable in a variety of modes, but the really neat part is that you 
can do it with no special equipment at all. Just set the stereo mode to 
'redblue' and you can use the cheap red-blue glasses that come with kids 
books and happy meals (and are used for viewing Mars photos). You can 
buy these glasses in bulk for pennies a piece and show true 3D programs 
to a roomful of people using a standard LCD projector. Kids love this!

Typically, making a program stereoscopic is as simple as doing:
scene.stereo = 'redblue'

You can also control where the scene seems to be relative to the 
display. By default, the scene is behind the screen, which is easiest to 
view. Setting the stereodepth to 1 centers the scene at the screen. 
Setting it to 2 puts the back edge of the scene on the screen. The 
objects seem to float in space in front of the screen. For some 
programs, the effect is really quite eye-popping. I usually use 
something like:
scene.stereodepth = 1.5

>A motivation is 'Teaching Python with Graphics', which I'm suppose to
>present 45 minutes on at OSCON end of July.  I'm planning to use my
>not-so-fancy laptop (1.2 Duron Compaq Presario 700) running Linux 2.4
>(Mandrake 9.2) and Python 2.3, and graphics libraries (PIL, PyGame,
>The focus is on smallish projects involving graphics and Python programming.
>For example, awhile back I posted re some of that Wolfram-style cellular
>automata stuff, using POV-Ray for output.  I've since adapted that to PIL.  
Kirby, I'm wondering if you have tried any of the cellular automata 
stuff using my graphics package. I suspect it would be dead simple, 
probably much eaiser than with POV-Ray or PIL. I haven't actually 
compared, so that's just a hunch.

>On the POV-Ray side, I do want to demo simple animation-building, though I
>haven't yet moved the whole stills-to-movie process to Linux (however, I'm
>confidant mplayer will both build and play the stuff).
>>P.S. - consider  Python Programming for absolute
>>beginner by Michael Dawson as a text.
>>Darren Payne
>>Hurlstone Agricultural High School
>>>Today's Topics:
>>>   1. Introductory high school programming class -
>>>Python or
>>>      TeachScheme (Joseph Ehlers)
>>>   2. Python for High School Students (Garret
>>>   3. RE: Introductory high school programming class
>>>- Python
>>>      orTeachScheme (Kirby Urner)
>>>   4. RE: Introductory high school programming class
>>>- Python
>>>      orTeachScheme (Liow, Dr. Yihsiang)
>>>Message: 1
>>>Date: Wed, 5 May 2004 20:48:25 -0500
>>>From: "Joseph Ehlers" <ehlersjp at msn.com>
>>>Subject: [Edu-sig] Introductory high school
>>>programming class - Python
>>>	or	TeachScheme
>>>To: <edu-sig at python.org>
>>><BAY4-DAV64OgRGkQ6mB00001262 at hotmail.com>
>>>Content-Type: text/plain; charset="iso-8859-1"
>>>I'm trying to propose an introductory computer
>>>programming class for high school students.  I do
>>>not have a programming background so I will be
>>>learning the language just like the students.
>>>Through my research I came across Python.  It sounds
>>>great - easy to learn, teaches thinking skills, and
>>>is fun.  I was set to go with Python then I came
>>>across the TeachScheme project which also sounds
>>>great - it too is easy to learn, teaches thinking
>>>skills and comes with lots of curriculum.  I have a
>>>few questions and I'm hoping this group can shed
>>>some light on this issue.
>>>1.  Is one better than the other (Python  vs.
>>>TeachScheme) to teach high school novices
>>>programming skills, thinking skills, language, and
>>>keeping their attention so I can then have an
>>>audience for a second, more advanced programming
>>>2.  I've looked at "How to Think Like a Computer
>>>Scientist", it looks very doable for a novice and
>>>"Python Programming for the Absolute Beginner"
>>>(Premier Press) looks like a lot of fun.  Is  there
>>>any other curriculum for high school students out
>>>3.  Is it possible to teach a semester of
>>>TeachScheme and a semester of Python or is that
>>>overkill on the basics and not doing justice to
>>>either program?
>>>I appreciate your assistance.
>>>-------------- next part --------------
>>>An HTML attachment was scrubbed...
>>>Message: 2
>>>Date: Wed, 05 May 2004 22:59:38 -0400
>>>From: Garret McGraw <garret_mcgraw at yahoo.com>
>>>Subject: [Edu-sig] Python for High School Students
>>>To: edu-sig at python.org
>>>Message-ID: <4099AA1A.6030508 at yahoo.com>
>>>Content-Type: text/plain; charset=ISO-8859-1;
>>>Hey there,
>>>I don't know a whole lot about what kinds of
>>>curriculums there are for
>>>high school classes but some things I have
>>>discovered in my 2 years of
>>>programming with Python are these. As great as
>>>Python already is, it has
>>>great pontental for becoming greater as differences
>>>between modern
>>>platforms widen because it as totally portable
>>>between platforms.  It is
>>>available for almost any operating system and is
>>>100% compatable between
>>>all of them.
>>>It is great for the younger generations because it
>>>is used for almost
>>>anything from homework (specificly math) to many
>>>large industry-level
>>>projects and buisnesses such as Google and I think
>>>Yahoo! also.  I know
>>>this comparison is a little out-of-place but I think
>>>with intrests of
>>>preparing young minds for the real world, its very
>>>appropriate to use,
>>>because python, due to its extreme ease in which it
>>>can be learned and
>>>its enjoyable programming qualities known to many of
>>>us is the perfect
>>>tool for any computer minded teen-ager.
>>>I could go on all day about python but I think I'll
>>>just end here by
>>>giving a list of reasons why I believe you should
>>>seriously consider
>>>using Python in the classroom.
>>>1.  It is fun and quick to write code using.
>>>2.  It is actually very easy and fast to learn.
>>>3.  It is (as earlier mentioned) used in the real
>>>world for a variety of
>>>4.  It is very well documented and if you have
>>>questions, there is
>>>always somebody out there who had that question at
>>>one time and can
>>>answer yours by means of newsgroup or other internet
>>>5.  It is 100% portable between systems.
>>>6.  It has the coolest mascot. (The snake of course)
>>>7.  I am a high school sophomore myself and I use it
>>>for just about
>>>everything from school assignments to website CGIs.
>>>I hope this helps,
>>>Message: 3
>>>Date: Wed, 5 May 2004 20:23:49 -0700
>>>From: "Kirby Urner" <urnerk at qwest.net>
>>>Subject: RE: [Edu-sig] Introductory high school
>>>programming class -
>>>	Python	orTeachScheme
>>>To: "'Joseph Ehlers'" <ehlersjp at msn.com>,
>>>edu-sig at python.org
>>>Message-ID: <E1BLZUE-0002AO-M1 at mail.python.org>
>>>Content-Type: text/plain;	charset="iso-8859-1"
>>>Hi Joseph --
>>>Congrats on doing good research and landing two big
>>>Years back on this list, one of the TeachScheme
>>>principals (Matthias)
>>>subscribed for a spell, so he could debate some of
>>>these very questions you
>>>The discussion gets rather technical at times. See:
>>>See also this quick summary:
>>>My points in favor of Python:
>>>1. the object oriented paradigm is close to the
>>>surface ("everything is an
>>>object") while in Scheme it's a more advanced
>>>2. because of 1, Python is a natural lead-in to
>>=== message truncated ===
>>Darren Payne
>>Hurlstone Agricultural High School
>>Ph:  9829 9222   Fax: 98292026
>>web:   www.hurlstone.com.au
>>email: computing at hurlstone.com.au
>>Do you Yahoo!?
>>Win a $20,000 Career Makeover at Yahoo! HotJobs
>>Edu-sig mailing list
>>Edu-sig at python.org
>Edu-sig mailing list
>Edu-sig at python.org

More information about the Edu-sig mailing list