Bill Manaris : Spring 2008 / CSCI 110 Homework 4

Assigned Date: Tuesday, Apr. 22, 2008
Due Date: Tuesday, Apr. 29, 2008
Due Time: noon

Last modified on April 22, 2008, at 10:21 AM (see updates)


This assignment focuses on creating stereoscopic 3D images using Python, and on combining different technologies to create an interesting artifact (e.g., digital cameras, HTML, etc.).


Write a Python program to generate anaglyph 3D images.

Anaglyph images provide a stereoscopic 3D effect, when viewed with 2-color (e.g., red-cyan) glasses.

To create an anaglyph image, you start with two images of the same subject taken from two slightly different angles.

Then you combine the two images into one. For every pixel of the result image, use the red value from the left image, and the green and blue values of the right image.

The stereoscopic effect is generated by the visual cortex of the brain, since each eye is getting information from the corresponding (left or right) image.


Step 1

First write out your Python program to combine two images into one, using one of the two algorithms above. Test it to make sure it works. Here are some more images:

Step 2

Go around campus and find five artifacts that would look interesting in 3D. Use a digital camera to take pictures. Use a program like IrfanView to resize the images to a small enough size (between 100KB and 1MB each).

Step 3

Create an HTML page with your images (left, right, and 3D). Add titles and interesting text describing the artifacts. Be creative.


Your grade will be based on correctness (e.g., good 3D images), aesthetic effect (e.g., interesting images), and presentation (e.g., nice web page).


  1. Submit the following to WebCT:
    • the Python program
    • the original and 3D images (name them well, e.g., statue_left.jpg, statue_right.jpg, statue_3D.jpg)
    • the HTML page
  2. Post your HTML page to your student web space.
  3. Email me, with subject "CSCI 110: Homework 4", the link (URL) to your page on server


For testing, here are some more left and right images (all shot with an iPhone camera):


The idea for this assignment comes from J. Ben Schafer and Patrick A. Troy through the Mediacomp-teach mailing list.

(Printable View of