Technical Background - Cinderella Documentation
Description: The user's guide to the Interactive Geometry Software Cinderella

# Technical Background

This section from the original 1999 manual is reproduced here for historic reasons.

Normally you would, and should, not care about the programming language and other technical details of software you just want to use. Nevertheless, we want to tell you about the computer science background of Cinderella.

Cinderella was written in Java, the platform independent programming language developed by Sun Microsystems. This means that the software can be run on any computer, irrespective of its operating system, provided that there is a thing called the "Java Virtual Machine" (JVM) for this system. These Java Virtual Machines are available from Sun Microsystems for Windows 95/98/NT and Solaris, and there exist ports for Linux, OS/2, MacOS, BeOS, AIX, HP-UX and many more. In fact, you probably already have a JVM installed on your computer, since Netscape Navigator and Microsoft Internet Explorer have a built-in JVM. This, in turn, means that you can run Java programs inside a web browser. These programs are known as "Applets".

We do not want to explain Java in full detail here, instead we recommend the official Java home page at http://www.javasoft.com as a starting point for further reading. However, we do want to tell you about some of the consequences of choosing Java for Cinderella.

It is a fact that, although Microsoft Windows is the dominating operating system today, many mathematics departments have a variety of Unix workstations. Even within the same working group you can find a mixture of different systems. Java enables everybody, regardless of the choice of platform, to use Cinderella in the same way. It is even possible to install and use the same code on all of your computers. For us, we could use our favorite operating system (Linux) for development, and at the same time we were sure to reach the largest possible audience.

Second, the fact that you can run Java software inside web browsers has been used for the web export functionality of Cinderella. This means that you can publish constructions easily, spice up your personal home page with animations, or assign construction homework to your students. Our license agreement gives you great freedom in redistributing the necessary parts of Cinderella, but please obey the few restrictions that come with it.

Java is an interpreted language, as opposed to compiled languages like C or C++, which are the usual languages used for most software. Interpreted languages have some technical advantages, but they suffer from an additional translation step which slows the program down. Java (or the virtual machine) has been tuned a lot for performance, and the performance gap is not as large as it was when our project started. Still we had to do a lot of optimization by hand to create acceptable speed, and the "interactive feeling", of Cinderella.

Sometimes you'll notice a short delay when you move a point. Do not blame your computer, Java or Cinderella. These delays are caused by extremely complex calculations which are necessary to get the correct result or the correct screen representation after a movement. The generation of correct loci is one reason for that; many intersections involving conicals are the other. We tried our best to speed up these calculations, but there is a (mathematical) limit where we do not want to sacrifice accuracy for speed.

Finally we want to mention the tools that helped us creating Cinderella and this documentation. First there is XEmacs, a powerful, extensible text editor, which is based on GNU Emacs, which in turn is a version of the original Emacs written by Richard Stallman in the seventies at MIT. It is definitely the best editor available, and we used it to write the whole program and all of the documentation.

The program itself was developed with the help of the Java Development Kit of Javasoft, a division of Sun Microsystems, in particular with the Linux port of it (see http://java.blackdown.org for more information on the Java-Linux porting project). Linux is a free, unix-like operating system originating from the work of Linus Torvalds, and is now continually improved by the effort of several hundred developers all around the world.

The parsing engine (used for loading saved constructions) was constructed with the help of ANTLR 2.5.0, a public-domain Java/C++ parser generator, written by Terence Parr of the MageLang institute.

Post-optimization and compression of the code was done with Jax from alphaworks, the research division of IBM. We want to thank the Jax team, in particular Frank Tip, for their help and IBM for the permission to use Jax commercially.

The Concurrent Versions System (CVS) by Cyclic Software did most of the version merging (and saved us from a lot of headaches). It is free software, too.

Thanks to the "browser war" between Microsoft and Netscape, the licensing terms for redistributing Netscape Navigator allow us to ship a Java-1.1 compatible browser with Cinderella.

The documentation of Cinderella, both the printed manual and the online version, were written with XEmacs in HTML. We used the same files for the printed version and the screen representation. The design of the web pages uses Cascading Style Sheets (CSS); the hardcopy was created using a whacked version of html2ps by Jan Karrman.

The icons and images used in Cinderella were designed by ourselves with The GIMP (GNU Image Manipulation Program), written by Peter Mattis and Spencer Kimball. In our view it is one of the most impressive freely distributed pieces of software. The additional figures in the documentation were created with Cinderella, of course, and Povray, a free 3D raytracing software, and some PostScript hacking.

Two people deserve special mention: James Gosling, the creator of the Java programming language, and Jamie Zawinski, responsible for the first Unix versions of Netscape Navigator. They are both connected to XEmacs in a special way: James Gosling did the first C-implementation of Emacs, known as GOSMACS, and Jamie Zawinski was the person responsible for XEmacs versions 19.0 to 19.10, which was at that time a collaborative work of Lucid (now out of business) and Sun Microsystems (sic!).