A Scheme Binding for Open Inventor

(build-recursive-fern fern-root surfsep 25 0.8 2.0 2.5 0.2 -0.2)
View the full source

Version 1.6 is now available; check the list of changes. The source code is available for download.

Come visit the Schemelet page to see how to make Ivy work with the World Wide Web!

Description of the Ivy Package

Ivy is a Scheme binding for Open Inventor. From the Scheme home page at http://www-swiss.ai.mit.edu/scheme-home.html:
Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language invented by Guy Lewis Steele Jr. and Gerald Jay Sussman. It was designed to have an exceptionally clear and simple semantics and few different ways to form expressions. A wide variety of programming paradigms, including imperative, functional, and message passing styles, find convenient expression in Scheme.

Open Inventor is a 3D graphics toolkit developed by Silicon Graphics. Open Inventor provides a large set of C++ classes which makes developing sophisticated, interactive programs using 3D computer graphics much easier than ever before.

The Ivy package provides a Scheme interface to nearly all of the Open Inventor classes. This means several things:

Operation of Ivy

Ivy works by providing a consistent interface to the member functions and class variables of the Open Inventor classes. The underlying C++ functions are called from the Scheme backend. From the user's point of view, hopefully, all that will need to be learned is a simple syntactical change.

Ivy is implemented as an extension to Aubrey Jaffer's SCM Scheme interpreter. A modified version of scm4e1 is included within the Ivy distribution. However, all the differences from the original SCM distribution are enumerated within, so you can obtain the original distribution and modify it to work with Ivy if you wish. Note that Aubrey has continued development of SCM since Ivy was first developed, and that I have not yet had time to bring Ivy up to date; see the suggested projects section of this page.

What the Ivy Package Provides

The Ivy sources can be compiled into SCM to create a program which is a Scheme interpreter with knowledge of most Open Inventor classes. You can write programs in Scheme and interact with them visually via the Open Inventor toolkit. These programs can be modified at runtime to provide a rapid prototyping environment for Open Inventor. Ivy also provides a simple C++ wrapper to SCM to allow a Scheme interpreter to be quickly embedded into an existing C++-based Inventor program.

Ivy contains most of the Inventor Mentor examples converted to Scheme, as well as most of the macros (SO_KEY_PRESS_EVENT, etc.) and enumerations defined by the Inventor headers. It also contains several games written in Scheme which demonstrate its usage.

Changes in Version 1.6

View the source code for the included Space Combat game

How Ivy was Created

Ivy was generated using Header2Scheme, an automatic C++ to Scheme interface generator. Nearly all of the code comprising Ivy was auto-generated. (Weighing in at nearly 150,000 lines, it would have been extremely impractical to code by hand.) Recreating the source for Ivy now takes approximately ten minutes.

Downloading the Source Code

ivy-1.6.tar.gz (3729K) contains the source code for Ivy, all examples, and a precompiled ivyscm executable compiled on Irix 5.3 (o32) with Inventor 2.1. This executable has been tested on 5.3, 6.2, 6.3, 6.4, and 6.5.

Compiling Ivy

An ivyscm executable is now included in the distribution. If you need to compile Ivy in order to embed it in your own applications you will need SGI's C++ and C compilers (7.2 or newer recommended, though older versions back to those shipped with 5.3's IDO should work) and the Inventor 2.1 development environment.

Using the standard (debugging) compile options, compilation of the Ivy package requires approximately 100 MB of free disk space. The object files generated by the Ivy source code take up approximately 30 MB of space; these may shrink greatly if you use different compile options than the ones that come with the package and strip the resulting executables of symbols. The Ivy library takes up another 30 MB, but once it is built the object files can be removed. (However, ar requires as much work space as the final library will consume.) Finally, the resulting SCM executable (linked against the Ivy library) takes another 30 MB of disk space.

Known bugs (It's not a bug, it's a feature!)

Work To Do

Suggested projects for people interested in developing (rather than using) Ivy:


Please notify me via email if you find problems with the distribution or documentation, or if you have any comments or questions.

Kenneth B. Russell - kbrussel@media.mit.edu

$Id: index.html,v 1.18 2001/06/02 05:20:53 kbrussel Exp $