The Escher School of Fish: Modelling with Functions
DDD Foundations - Talk
This is a live coding session based on a classic 1982 paper by Peter Henderson. The paper shows the decomposition and reconstruction of Escher's woodcutting "Square Limit", a beautiful recursive tessellation of interleaving fish, using functional programming. The central idea is to create an abstraction that is not mere passive data, but rather a function that accepts a set of constraints and adjusts to those constraints as appropriate. In this case, we model a picture as a function that accepts a bounding box as input, and renders itself correspondingly. We then define a small set of higher-order functions that operate on pictures - transforming them and composing them into more complex pictures. These functions are sufficient to create a replica of Escher's Square Limit in the browser. The approach is particularly appealing for producing beautiful recursive visuals, but also lends itself to such mundane tasks as fitting circuits on a circuit board.
About Einar Høst
Einar W. Høst has been a software developer for a long time. He enjoys collaborative modelling, API design and computer programming. He is working as a socio-technical facilitator at the Norwegian Labour and Welfare Administration.