Pan is a language of interactive functional images. A Pan program is a function from points on a plane onto colors. These functions are parameterized by controls which interactively adjust image parameters. Thus a Pan program describes a family of pictures to be explored using the attached control devices. Pan can be used to expose students to basic principles of functional programming in an interesting and creative manner. It is also useful for teaching mathematical principals in a visual, interactive style. But the real reason to use Pan is that it's fun! Pan turns tiny programs into complex images, abstract mathematics into elegant pictures, and programmers into artists.
There are two different implementations of the Pan system. The original Pan system, as developed by Conal Elliott, Oege de Moor, and Sigbjorn Finne, is available at http://www.conal.net/. This first implementation of Pan is embedded in the Haskell programming language, an approach that presents Pan programmers the full capabilities of the Haskell language. It also exposes beginners to the complexity of a fully featured programming language, occasionally making it difficult for novices to use. Pan# is a reworking of the original Pan system. It uses the same core compiler but has a reworked surface language and uses C# language and Microsoft .NET framework for graphics support. Pan# is a simplified Haskell-like language that avoids some of the complexity of the original Haskell embedding. It is also easy to install and use, requiring no supporting software beyond the free .NET framework.
Running a Pan# program is simple: opening a .pan file, either by double-clicking or using the "Open" command on the viewer menu, compiles and displays the image and controls defined by the program. Pan# also writes a .dll containing compiled code so that a program can be re-opened at a later time without a compilation delay. One of the best ways to leard about Pan# is is to run the sample programs distributed with Pan#. The "file open" command in the Pan# viewer initially points to the demo directories. After opening a demo, you can view ".pan Source code" to see the program currently running.
Programmers already familiar with Haskell can skip to section 7 now and then look at the reference (section 5) and the examples in the distribution.
Pan# has not yet been ported to non-Windows systems. We expect that a portable .NET implementation such as Mono will allow Pan# to run on other platforms with relatively little effort. Please send bug reports or inquiries to John Peterson at peterson-john@cs.yale.edu. The Pan# website is at www.haskell.org/edsl/pansharp.html.