Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

February 2005
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28
Jan  Mar

Escher in Lisp

Sunday, February 13, 2005

Frank Buss commented on c.l.l. how he never really understood how to use higher order functions as combinators, until he read the article from Peter Henderson about Functional Geometry. He has written his own article about how he used these concepts and Common Lisp to re-create the famous recursive fish drawing by M.C. Escher. The Henderson approach will be familiar to those who have read the "Picture Language" example in SICP (see also the video - Lecture 3a).

Frank's code outputs a Postscript file. Rainer Joswig did a CLIM version of the Lisp code and Geoffrey Summerhayes did a LispWorks CAPI version. Since I've been fascinated by Escher's work for many years, I downloaded the code and had a play with it on my iMac. The screenshot below shows Frank's and Geoffrey's versions. The only mod I made was to the "plot" function in Frank's code (he hardcoded in some Win32 file locations which I "treaked" for the Mac).



emacs Copyright © 2005 by Bill Clementson