In this lab, you will build procedures that operate on rectangular images, rather than numbers. Using these procedures you'll produce geometric quilt patterns, such as the Repeating Crosses pattern shown on page 27 of the text.
(load "/Net/solen/u8/Faculty/ek/karl/Public/MC27/quilting")Now you should be able to see each block by evaluating its name. (When the value of an expression is an image, it is displayed in its own graphics window instead of printed out with
;Value:
.)
We have also included two solid blocks, black-bb
and
white-bb
.
stack
and quarter-turn-right
procedures are built into our Scheme. Try them out as in exercise 1.8
on page 28 of the text, and make sure you understand what each does
and how combinations behave. (We should point out here that the code
from the book is available to you in files in the directory
/Net/solen/u8/Public/Concabs
, with the code
from chapter 1 being in the file chap1.scm
. Using these
files will substantially reduce your typing.) Note that names such as
rcross-bb
continue to name the same, unmodified basic
block throughout. The procedures give you back transformed copies of
the image rather than changing the original image in any way. Write a
precise description of what each of these two primitive procedures
does.
Rather than putting your procedure definitions in the main interaction window, it would be best to put them in a separate document. You can create a separate document on the SGIs with the New option of the File menu, and on the NeXTs with the New option of the Document menu. You can evaluate all of the definitions in a document by using the Evaluate All option of the Actions menu (either computer), or you can evaluate them one at a time and test as you go. Note that all the output from Scheme appears in the interaction window, not the document window.
We've included two documents to give you a better sense for what we expect from your lab write-up. The first is a sample write-up for a much shorter lab. This sample write-up was done using Schematik (the Next version that preceded SchematiX) itself, which isn't much of a word processor, so the appearance isn't very fancy. However, we'd be satisfied with this. On the other hand, it isn't really very hard to make a fancier report using for example the WordPerfect word processor on the NeXTs, since you can easily have the computer copy both text and images from Schematik into WordPerfect. The lab assistants should be able to help you with the mechanics of this. Whatever you do, don't manually copy by retyping---students who do this inevitably make typos and wind up handing in procedures that couldn't possibly have worked. Another hint: if you do use WordPerfect, put your Scheme procedures into the ``Courier'' font. In this font, every character is the same width (like on a typewriter, or in the SchematiX program), so the indentation will line up correctly.
The other document to consult is entitled "Suggestions for clear lab reports in computer science courses", which pretty much says it all.
In general, be sure to read through your report and fix any problems you find, either in general presentation or in spelling and grammar. Not only do spelling and grammar errors detract from the clarity of your report, they suggest that you judged the report not to be worth the time to read. If you aren't willing to read your own report, who will be?
mirror-image
. Be creative!