Functional Image Synthesis

Conal Elliott

(while at) Microsoft Research

Abstract

Pan is a declarative language and optimizing compiler for image synthesis, based on a simple but precise semantic model: pictures are functions from infinite, continuous space to colors with partial opacity; and effects are functions over pictures. Because of the centrality of functions, Pan is based on the functional programming paradigm, and is in fact embedded in the functional language Haskell.

In order to obtain interactive performance, a Pan program is executed to generate optimized C code. This program-generation phase performs full inlining, algebraic simplification, code hoisting, and common subexpression elimination. The resulting C program is then further compiled into efficient machine code, which is executed for display. No knowledge of the picture domain is built into the compiler, so we expect that it can be easily adapted for other domains, including 3D modeling and sound synthesis.

The talk will be illustrated by many live, interactive examples. No knowledge of image synthesis or functional programming is assumed.