Using Open Geometry GL with LINUX

Abstract

OpenGeometry is a graphic library for programming geometry. It is based on C++ and OpenGl/Mesa3D. The reader is enabled to realize geometrical thinking without having to care much about implementation. (cit. from the preface of the first book)

The source-code of the library is published with these books:

In order to compile the library with gcc under LINUX you have to patch the source-code.

Get Open Geometry running with LINUX

Please note: the library source-code is only provided with the books.

Open Geometry Version 1

Follow these generic steps to get the program compiled with LINUX. The details to setup the C++-development environment for OpenGL development are beyond the scope of these hints.

  1. Create a directory to hold all our data (optional)
  2. Change to this directory (optional)
  3. Unpack the zip-archive with the library-source
  4. Apply the patch
  5. make compiles the library and creates a first executable example, called x.
  6. Start up the example. It shows a simulation of earth and moon. You can animate the view by pressing keys f and t in turn and change some options like viewpoint, lightning, zoom, ... Key k shows a list with the options.
  7. The last step starts up a dialog-programm in the terminal-window where all the examples that are provided with the library source can be compiled and run in turn. Use the cursor-keys to select an example and RETURN to start it. Please note: Most of them are working, but some don't.

    Show_examples.sh uses the program dialog to show the list. The reqired Debian package is called - dialog.

Open Geometry Version 2

Use this small recipe to get the library running under LINUX. This is for Open Geometry GL version 2 and Knoppix 5.3.

Please note: the library source-code is only provided with the books.

  1. Create a directory to hold all our data (optional)
  2. Change to this directory (optional)
  3. Unpack the tar-archive with the library-source
  4. Change to the newly created directory
  5. Apply the patch
  6. This is wired. Knoppix doesn't provide the needed GLUT-Library under its usual name. So we create this alias for the lib.
  7. make compiles the library and creates a first executable example, called x. Don't mind the many warnings.
  8. Start up the example. It shows a geometrically constructed shell in front of a photograph of a shell. You can animate the shell by pressing keys f and t in turn and change some options like viewpoint, lightning, zoom, ... Key k shows a pop-up with all the options.
  9. This last step starts up a dialog-programm in the terminal-window where all the examples that are provided with the library source can be compiled and run in turn. Use the cursor-keys to select an example and RETURN to start it. Please note: Most of them are working, but some don't.

Known problems

Non accelerated graphic: if the X-Server doesn't provide an accelerated driver for your graphic card, the animations will be slow.

Some examples are not functional: Due to different reasons some examples don't work. If you can fix a problem, please send a patch.

Links


Franz Zahaurek
Last modified: Fri Dec 2 16:49:28 CET 2011