Python as a teaching (visualization) tool

K

Kyler Laird

I've been using Pyrex to get me through the Computer Vision
class I'm taking this semester
http://shay.ecn.purdue.edu/~ece661/
by dealing with the requirement that all programming
assignments be submitted as C code. That's worked *very* well
for me and I'm thankful that I don't have to deal with writing
the assignments in C from scratch. (I am sure that it would
degrade my understanding of the course material.) Now I've
found another use for Python in this course.

Our lecture yesterday
http://shay.ecn.purdue.edu/~ece661/ECE661S04LectureNotes/CV10.pdf
was about Hough Transformations.
http://shay.ecn.purdue.edu/~ece661/ECE661S04Handouts/DudaHart_HoughXform.pdf
There were a lot of questions about how points in image space
appear in parameter space and what a point in parameter space
represents in image space. I was a little confused and trying
to stay on top of the conversation. The visualization in my
head was fuzzy.

The instructor made a comment along the lines of "No one ever
shows the sinusoidal curves in papers" and instructed us to go
home and try drawing some. It struck me that it would be a
*huge* benefit to have tools to help students visualize these
concepts in the classroom.

So I built one.
http://lairds.us/ECE661/Hough
*Now* I can see how the transform works. Much better. (The
parameterization used is for detection of lines.)

What does all of this have to do with Python? Well, I did build
the little Hough tool using Python (and PIL), but while I was in
class thinking "There's got to be a better way to show this" I
kept thinking in terms of taking advantage of Python's
interactive nature to whip together tools like this in front of
a class. Numeric, PIL, WxPython, SciPy, GGobi, MayaVi, ... if
an instructor had a basic understanding of some of these tools
and a handy framework for using them, explanations of many
difficult concepts would come very naturally.

I don't mind building my own tools from rough building blocks,
but I'm going to watch for tools that would be more appropriate
for classroom presentations. I welcome suggestions.

--kyler
 
A

Aahz

I don't mind building my own tools from rough building blocks,
but I'm going to watch for tools that would be more appropriate
for classroom presentations. I welcome suggestions.

Cool! Gonna be at PyCon? There should be lots of opportunities for
discussions like this there.
 
K

Kyler Laird

Cool! Gonna be at PyCon?

DC?! Uh...no.
There should be lots of opportunities for
discussions like this there.

Yeah, it's tempting. I am certainly feeling the urge to once again
be in the physical presence of lots of Python people but it's not
enough to get me to go to DC.

Perhaps I'll head out West to the O'Reilly Open Source Conference
this year.
http://conferences.oreillynet.com/os2004/
I see that Python 12 is part of it. Yes, that would be a nice way
to spend my birthday. See you there?

I still hope that people will point out solutions here, of course.
(I was half expecting someone to say something along the lines of
"Why didn't you just pull up PyXXX, create a new window, and send
it the Hough_transform() message?")

--kyler
 
A

Arthur

What does all of this have to do with Python? Well, I did build
the little Hough tool using Python (and PIL), but while I was in
class thinking "There's got to be a better way to show this" I
kept thinking in terms of taking advantage of Python's
interactive nature to whip together tools like this in front of
a class. Numeric, PIL, WxPython, SciPy, GGobi, MayaVi, ... if
an instructor had a basic understanding of some of these tools
and a handy framework for using them, explanations of many
difficult concepts would come very naturally.

I certainly feel there is something substanital to be explored and
exploited here.

My effort to give it realization is PyGeo

http://pw1.netcom.com/~ajs

which uses VPython for 3d rendering - which I think deserves mention
on your list particularly because of its facility at the interactive
prompt.

And I will in fact be hoping to dazzle with my presentation of PyGeo
at PyCon.

One concrete thing I think would help spread the gospel as to Python's
usefulness in this area is a LiveCD - Knoppix based, let's say - that
would come pre-configured with a good amount of this good stuff.

Getting up and running with some of these tools can otherwise be a
chore that one cannot expect the merely curious to undertake.

I have been contemplating a sourceforge project to produce a LiveCD of
Python related educational/visualization tools.

Would you jump in?

Art
 
K

Kyler Laird

Arthur said:
My effort to give it realization is PyGeo

which uses VPython for 3d rendering - which I think deserves mention
on your list particularly because of its facility at the interactive
prompt.

I like it. I hope it becomes a Debian package soon.
One concrete thing I think would help spread the gospel as to Python's
usefulness in this area is a LiveCD - Knoppix based, let's say - that
would come pre-configured with a good amount of this good stuff.

I'm quite dependent on Knoppix/Morphix these days. I appreciate
what they allow.
Getting up and running with some of these tools can otherwise be a
chore that one cannot expect the merely curious to undertake.

I need even more than that right now. I'd like to be able to run
tools on the MS Windows-based computers that litter the classrooms
on campus. That leaves me to either use pure Web-based apps like I
usually make or perhaps Java applets.

I haven't done anything with Jython in a long time but I was
hoping to experiment with it again for building applets. That
would make it easy to deliver some simple interactive apps.

I'm also hoping to figure out a good way to integrate SSH and VNC
into a Java applet so that I can easily use a browser to run apps
on a better platform. That'll give me a lot more flexibility to
run things that Jython won't.

A Knoppix-like solution doesn't work at all in many cases (locked
BIOS) and is clumsy in others (where the instructor presents using
PowerPoint). I think it would be a *great* thing to give to
people who do control their presentation systems though. I can
easily imagine a compelling demonstration to high school teachers
followed by "Oh, and here's a CD you can use to do all of this.
Grab one on your way out the door and feel free to make copies
for your students and colleagues. No salesmen/lawyers will call."
*That* could be very exciting.

--kyler
 
A

Arthur

I like it. I hope it becomes a Debian package soon.


I'm quite dependent on Knoppix/Morphix these days. I appreciate
what they allow.

The Morphix concept is wonderful. In lieu of a full-fledged LiveCD of
Python related visualization tools, would be a base Morphix
distribution of some of the key enabling infrastructure tools - let's
say wxPython, Numeric, pyOpenGL, pygame. And hopefully people will
morph from there as to their specific needs. I'll get to it,
eventually.
I need even more than that right now. I'd like to be able to run
tools on the MS Windows-based computers that litter the classrooms
on campus. That leaves me to either use pure Web-based apps like I
usually make or perhaps Java applets.

As much as I believe Linux should be encouraged as the preferred
educational platfrom - for a number of reasons - I agree that it is
foolhardy to be reliigious on the issue. The fact is that my own
day-today desktop is Windows, and I have tried to see to it that some
key tools in the category you describe are available as easy Windows
installs

http://pw1.netcom.com/~ajs/download/

This "service" tends to be of particular relevance shortly after a
major Python release.
I haven't done anything with Jython in a long time but I was
hoping to experiment with it again for building applets. That
would make it easy to deliver some simple interactive apps.

Yeah but...

Perhaps good for demos. But in the area in which I am most interested
- geometyry - I find interactive applets tend to be a bit glib - if
that word makes sense in this context - and don't provide an avenue
for the kind of involvment that scripting does. Unless what it is we
are doing is providing the student with the tools to be the creators
of the applets.
I'm also hoping to figure out a good way to integrate SSH and VNC
into a Java applet so that I can easily use a browser to run apps
on a better platform. That'll give me a lot more flexibility to
run things that Jython won't.

Don't understand.
A Knoppix-like solution doesn't work at all in many cases (locked
BIOS) and is clumsy in others (where the instructor presents using
PowerPoint). I think it would be a *great* thing to give to
people who do control their presentation systems though.

Wouldn't it be.
I can easily imagine a compelling demonstration to high school teachers
followed by "Oh, and here's a CD you can use to do all of this.
Grab one on your way out the door and feel free to make copies
for your students and colleagues. No salesmen/lawyers will call."
*That* could be very exciting.

And with Morphix, see how easy it might be to add you own matter to
the existing matter,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,630
Members
45,334
Latest member
66Zeinab9

Latest Threads

Top