Graphing with higher-order procedures

Relevant section in text: 1.3

The assignment develops a representation of points in the plane as procedures that take 0 or 1 as an argument and returns, correspondingly, an x or y coordinate. (This is precisely the procedural representation of pairs described in section 2.1.3.) Starting with this, students build a functional language of curves and transformations on curves, including a recursive transformation that draws fractal curves.

This assignment can be a bit mindblowing, since it gives such a fast immersion into higher-order procedures.

Files for download:

ps2.tex TeX source for the assignment. (We're sorry: the image files required to regenerate the figures are unavailable for this assignment.)
Scheme source code required for this assignment. Postscript file for printing the assignment

Copyright © 1985-1996 Massachusetts Institute of Technology.
The material in these problem sets may be duplicated, modified, and redistributed for any non-commercial use in conjunction with the book Structure and Interpretation of Computer Programs.

Return to sample assignment page

Return to SICP page

Last modified August 30, 1996