Pan

Pan is an Embedded Domain Specific Language for the composition of interactive images and animations. It was originally conceived by Conal Elliott and the original implementation was written by Conal Elliott, Sigbjorn Finne and Ooge de Moor. However, the original implementation only worked on Windows.

This is a cross-platform re-implementation of Pan in Haskell using the wxWidgets GUI library and OpenGL graphics library.

News

29 June 2005
Support for saving bitmaps has been added.
18 June 2005
Bitmap support added. See Bitmap.hs sample

Creating effects

The best way to get started with Pan is probably to read Conal Elliott's original paper.
Conal Elliott. Functional Image Synthesis. In Proceedings Bridges 2001, Mathematical Connections in Art, Music, and Science, 2001.
There are also a large number of example effects on his web page. Also, a while back I wrote a tutorial on it.

Download

There are two parts to the implementation - the library, pan, and the client, panic. The easiest way to get both is using David Roundy's darcs.

Getting the library

$ darcs get --set-scripts-executable http://www.cse.unsw.edu.au/~sseefried/darcs/pan

Getting the client

$ darcs get --set-scripts-executable http://www.cse.unsw.edu.au/~sseefried/darcs/panic

Snapshots

But there are also daily snapshots available:
pan panic

Dependencies

There are a lot of dependencies.

For Pan library:

For Panic:

Building

Installation instructions are present inside each project in the README file. Both pan and panic are built using the new Haskell Cabal build framework. Tell me if you have any problems with it.

Caveats

This is a direct implementation of Pan. The original implementation worked in quite a different manner. Pan programs were actually programs to generate abstract syntax trees. The AST was then passed to a code generator that produced fast C code. Hence, in this implementation the effects don't run nearly as fast as they did in the original version.

Dedication

I'd like to personally thank Conal Elliott, firstly for creating Pan, but also for the willingness he has shown to discuss the ideas behind the language. Along with Paul Hudak, his work has been one of the principle reasons behind my choice to learn about functional programming and language design in general.