In this project, you will experiment with tree recursion by looking at fractal curves. Complete the project and its report individually (not with partners).
Work through all the exercises of section 4.3 in the text. See below for notes particularly about exercises 4.5, 4.7, and 4.8.
Rather than typing in the definition of c-curve, you can click on
the following file in Firefox and save it somewhere in your home
Note that we have included two things in that code besides the
(require (lib "fungraph.ss" "concabs"))loads the functional graphics library;
(set-default-image-size! 200)sets the default image size to 200 x 200 pixels; you can change that size if you wish.
We also define
differently from but equivalently to the
Regarding exercise 4.5: Note that both halfs of a d-curve are d-curves.
Regarding exercise 4.7: The examples in the book all involve c-curves between the points (0,-1/2) and (0,1/2), with just the level varying. You should also do some examples with other end points. Your goal should be to determine a formula L(d, n) for the length of a level-n C-curve between two points distance d apart. (In the book's examples, d is always 1. Your extra examples should vary this.) You need not mathematically prove that your formula always holds, though we'll provide extra credit for those who do.
Regarding exercise 4.8: You should have fun designing your own fractal. You can also design more than one new fractal. If you do so, they need not all be of the form described in exercise 4.8 (paths with detours). Some could be more like Sierpinksi's gasket than like c-curves, for example.
You should simply turn in a DrScheme printout that shows your procedures and the tests you did, including the images that resulted from the tests. Please format your submission into three sections titled, Code, Testing, and Formula for L(d, n).
For exercise 4.7, you can give your formula for L(d, n) in a text box, or you may find it easier to write it in by hand. Your audience for this submssion consists of people already familiar with this assignment, and so no formal writeup with introduction and conclusion is required.
To get some sense of how this project report will be graded, look at the grading sheet that we use.