We have developed a general graphical user interface. The purpose is to be able to visualize data on the fly and to be able to interactively change system parameters. This is particularly useful when developing new programs and wanting to understand the behavior of the system in question under different conditions. The results are bare-bones but streamlined and practical:
There is a documentation which explains how to use this graphics library.
To install this library on your computer you need to download graph.tar.gz. Place this on your computer in a suitable location and extract it using
tar xzvf graph.tar.gz
This will create a directory called newgraph. Change into that directory and call
make install
At this point the graphics library will be compiled and installed in the directory ~/lib and the include files will be put in ~/include. This corresponds to a local installation of the library.
You can test that the installation was successful by calling ./Graph3d.out which will test the implementation of various features of the GUI. It may be instructive to look at myprog.c, which is the source code for this executable.
To compile programs you have to point to the directories for the include files and the library, and you have to link the graphics library as well as the math and the X11 library. This is described in some more detail in the documentation. A typical compile command might look something like this:
cc -I ~/include -L ~/lib myprogram.c -lgraph -lm -lX11
Depending on your installation you may need other flags to indicate the location of the X11 libraries. For XQuarz on Apple computers you may need -L/opt/X11/lib
.
The compiling process can be simplified by using the make
utility together with a Makefile like this. With this Makefile in your current directory you can simply type
make myprogram
which will generate an executable called myprogram (rather than a.out in the case above).
Potential problems: there are several prerequisites that need to be fulfilled for this to work. You need to have installed a c-compiler, the make utility, and the X11 development libraries (usually contained in a package called libX11-dev). On a debian based system (such as ubuntu) you would install it by calling sudo apt-get install libX11-dev
.90% of problems arise from these prerequisites not being fulfilled.
Revision: This version of the GUI was published on Jan 19, 2016.
Back to homepage