Software Design
Spring 2008
Lab Exercise 12
Due: never!!!
- Install PIL, the Python Image Library. On Fedora:
yum install python-imaging
On Ubuntu:
apt-get install python-imaging
- Google `PIL tutorial' and try out some of the examples
in the tutorial. You will need to provide your own image files,
assuming that you don't have lena.ppm, which is a ubiquitous
and notorious image that has been used to test image processing
algorithms (Google `lena' for details).
- Install Pygame. On Fedora:
yum install pygame
On Ubuntu:
apt-get install python-pygame
- Annoyingly, the distribution doesn't
include the examples, so I have created a zip file that you can
download from http://wb/sd/code/pygame-examples.zip. Put it
in your Python directory and then
unzip pygame-examples.zip
It should create a directory named examples. Run
a few of the examples
and then read the Pygame tutorials at
http://www.pygame.org/docs/tut/intro/intro.htmland
http://www.pygame.org/docs/tut/chimp/ChimpLineByLine.html.
The second tutorial explains chimp.py, which is
in the examples directory.
- Install VPython. On Fedora:
yum install visual-python
On Ubuntu:
apt-get install python-visual
You can test it by running some of the examples. On Fedora:
cd /usr/share/doc/visual-python-3.2.9/examples/
python stonehenge.py
On Ubuntu:
cd /usr/share/doc/python-visual/examples/
python stonehenge.py
The documentation is available from http://www.vpython.org/.
- The examples should give you an idea of what is possible.
Choose an interesting one, make a copy, and play around with
it.
|