4. Late Night Lisp Machine Hacking

Kaveh Kardan
3 min readApr 19, 2022

--

Two things happened in my final semester as an undergrad at MIT: ArcMac became the Media Lab, and MIT offered their very first computer graphics course, a graduate class taught by newly-arrived professor David Zeltzer.

I immediately registered for the course and never looked back. I had found my calling. Everything about computer graphics — the very idea of creating images using a computer — had me enthralled. (As an aside, I also took every course taught by another professor who arrived at MIT during my time there: science-fiction writer Joe Haldeman. Over the years, I flirted with the idea of becoming a serious writer.)

When the lab made the move to their new I. M. Pei-designed building, I was there helping pull cables under the raised floor of the machine room. There were two Symbolics Lisp Machines workstations installed in the large comfortable lab space, and though only a lowly undergrad among the grad students, I came to think of one of the machines as being mine.

The other workstation was primarily used by two graduate students who were working on voice synthesis. Something having to do with voice inflection, as I recall. I remember their computer uttering the phrase “it’s obvious” over and over again.

Since I didn’t have an office at the lab, and the grad students were using the computers during the days, late night hacking it was for me. And that suited me perfectly.

Design & Code

The tree structure in the image above was generated by calling the function

make-fractal-plant-l-system

in the code sample below.

The rest of code shown is for the turtle commands and state machine which trace out the path of the tree shape as directed by the l-system grammar. The idea of turtle graphics (a physical turtle-like robot that drew on paper) was invented as part of the Logo programming system by Seymour Papert, who also had a lab within the Media Lab. Small world.

The sharp-eyed among you may have noticed that the turtle code is hardwired to the X-Y plane for now, hence the call to

make-z-rotation-matrix

I may change this later if I do more work on generating natural-looking shapes.

The generation of the structure’s “genome” by the production rules and their graphical interpretation are a bit too complected (as the Clojure gang like to say) for my taste. I may break the l-system class into distinct grammar and graphical parts in the future.

Next Episode

--

--

Kaveh Kardan
Kaveh Kardan

Written by Kaveh Kardan

MIT mathematics degree • wrote animation software used in “Jurassic Park” • software R&D lead on “Final Fantasy” movie • software dev on “The Hobbit” films

No responses yet