Most existing programming languages were designed in the days when the VT100 was the common display standard. With the increasing availability of graphics terminals, graphical interfaces have been added to many implementations. However, these interfaces are quite primitive and poorly integrated with the rest of the language.
In Unix environments, simple graphical support is provided by Xlib. Xlib primitives can be accessed from C. Several implementations (e.g. Franz Common Lisp) include a semi-standard interface (CLX) to the X window system, which is almost a word-for-word translation of the C primitives into Lisp syntax. MIT Scheme includes a similar set of low-level graphics primitives.
Fancy user interfaces can be constructed more easily using the Tcl/Tk toolkit. (Motif used to be used for this purpose, but is now obsolescent.) Tcl/Tk can be accessed directly from C code, or via an interface from a high-level language. For example, the CAML implementation of ML includes an interface to Tk. Similar primitives are built into the recent C-like language Java.
These interfaces are a nice match to C, but a poor match to the rest of the design of a modern high-level language. They provide the user with the ability to change arbitrary features of the graphical display, but at the cost of making simple graphics difficult. Simply displaying an image may require either constructing a new window event loop (in Xlib) or writing a new image reader in an obscure format (Tcl/Tk). Graphics code written in a high-level tends to look like a word-for-word translation of the corresponding C code.
An analogy to terminal I/O may be helpful here. Scheme provides simple primitives (format, display) which write a user-friendly representation of any object to the standard I/O stream. Users of high-level languages expect the language to provide a convenient way to write any object to the terminal stream, and a similar way to open a channel to a disk file and write any object to it. Our claim is that, similarly, the language should provide a simple, convenient way to create a window and display any graphical object on it.
Envision provides a set of basic geometrical objects (line segments, curves, circles, ellipses, etc) useful in implementing many computer vision algorithms. Only a single display function draw is required. Like the similar primitive for terminal I/O (display), draw examines the type of its input argument and choses an appropriate way to display it. By applying draw to different geometrical objects, the programmer can draw the full range of shapes standard in 2D graphics.
Ownership, Maintenance and Disclaimers
Manual Top Page