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. Use can then use induction on n to prove that the formula is correct for all d and for all n.
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.
~mc27/labs/fractal-curves/c-curve.scm