MCS-177 Lab: Fractal Curves

For this lab, work through all the exercises of section 4.3 in the text, except that exercise 4.8 is an optional problem you may do if you have time and interest. As usual, write up a lab report that explains all of what you did to an audience generally knowledgeable about Scheme and such, but ignorant of specifically what you did. Answer all of the questions posed, but do not simply write up your lab as a sequence of exercises. Instead, try to convey the big picture of what you accomplished. Remember, there are some tips in the document entitled ``Suggestions for clear lab reports in computer science courses.''

Some notes on Exercise 4.7 are in order. We do expect you to be able to prove that the length of the C-curve is determined by the pattern. One way to do this is to determine a formula L(d,n) for the length of a level-n C-curve between two points distance d apart. You can then use induction to prove that your formula is correct.

One technical tip: if you can't see a fractal with fine details clearly because it is too small, you can enlarge the image in Scheme by using the resize-image procedure, which is built-in to our Scheme. For example, (resize-image (line 0 0 1 1) 500) would give you an image of a line from the center of the image to the upper-right corner, but it would be much larger than usual.

Rather than typing in the definition of c-curve, you can click on the following file in Netscape and save it somewhere in your home directory.