Animate Arts I Winter 2004
Exercise 5: Stained glass patterns

Out: Thursday, March 4
Due: Tuesday, March 9, 11:59pm


In this exercise, you will build on the higher-level operators we designed in class to make a language for constructing simple stained glass patterns.

Part 0: Install new version of meta

This version has a number of bug fixes as well as the ability to save your editor configuration.  More importantly, it has the accessor procedures discussed in class today.

Part 1: Building new operators

Write code to implement the following procedures:

You will probably want to make liberal use of the stacking procedures defined in class.  You must provide test cases to demonstrate that each of these procedures work.  That is, you should include in your code calls that show that the procedure works as advertised.

Part 2: A harder operator

Now write a procedure [surround center fringe] that returns a new picture consisting of the picture center with copies of fringe arranged around the perimeter of its bounding box.  For example, the call [surround [box 50 50] [box 10 10]] should return an image that looks like:


Again, include test cases to show that it works.

Part 3: Have fun

Together with the operations discussed in class, you've now made a little picture language for creating ersatz stained-glass windows.  Play with it and have fun.  Experiment with making different kinds of images and choose the 5 you like best.

Turning it in

Due to time limitations, this assignment will not be critiqued.  However, you are still responsible for making your code intelligible and reasonably efficient.