Logo OS Reviews

Reviewing Freedom.



The Unrecognized Genius

Hendrik Weimer


Print version

Slashdot me! Digg me! Stumble me! del.icio.us

Whenever you are dealing with numerical data, an important task is to visualize the data in a simple but good-looking way. For many tasks in 2D plotting gnuplot does the job, but when it comes to more advanced stuff something else is needed. Xd3d aims to lift off where gnuplot stops, especially when it comes to 3D plotting or creating images with more than a few colors.

But before these things the Xd3d author has placed the installation procedure. If you build the package from source you will find a configure script, however it's a csh script and doesn't offer many options. It's hard to believe that in 2006 people still refrain from using autoconf. Okay, the autoconf scripts will probably be twice as big as the rest of your code, but that's still no excuse. To be honest, however, after installing (t)csh Xd3d should be built without bigger obstacles.

The user interface is okay, however it won't win any usability awards. Some parameters have to be entered on the console, but generally it doesn't take too much time to get familiar with it. A handy feature is that upon exiting, Xd3d prints the exact command line parameters needed to reproduce the last plot.

Plot of unstructured 3D data

Plot of unstructured 3D data
(click to enlarge)

Xd3d offers some features that are usually found in extremely specialized software or would otherwise require to write the visualization part on your own. Suppose you have a dataset consisting of various assorted x values and their function values f(x). This is extremely common for measurement data or simulation results. If you now want to plot your function for other values as well, there are many ways to do this, for example by using a spline interpolation. Almost any 2D plotting program supports this. Now suppose you don't have a function f(x) depending on one variable but a function g(x,y) depending on two. There is no trivial way to plot this because you have to interpolate a surface instead of a line. Xd3d uses a Delaunay triangulation to construct a surface made out of triangles and then plots the whole surface. Now try this with Maple, folks.

Contour line diagram

Contour line diagram
(click to enlarge)

An other part in which Xd3d scores is contour lines. Plotting contour lines (like the ones on topographical maps) with gnuplot is almost impossible. In Xd3d you just supply the data, specify how the contour lines should be spaced and optionally provide a coloring scheme.

Most people will only want to plot data that is given by data points in two or three dimension. But Xd3d can do more. There are various formats supported for 3D meshes that can be used to visualize a wire frame model. Unfortunately the formats are poorly documented. There is a file mentioning them but without giving an exact specification. The user manual (which is written in French) doesn't help either. The best thing to do is to take a look at the input/output function in the Fortran source code of Xd3d.

When trying to export an image, Xd3d first creates a XPM file using the functions provided by the XPM library. However, it seems that one of the recent security updates broke the API compatibility resulting in Xd3d producing invalid XPM files. This means that the following conversion to the desired format always fails. Postscript export works as desired, so all you have to do is converting the images by yourself.

To sum it up, Xd3d fulfills the typical cliché of open source programs. It is very hard to learn, but once you have mastered it, it becomes unstoppable.

Distributions: [?]□ Debian stable□ Debian unstable
□ Fedora■ Mandriva
□ Suse□ Ubuntu


  • 3D-plotting of unstructured data
  • Contour lines and vector fields
  • Poor documentation
  • Bitmap export broken

Copyright 2006–2008 OS Reviews. This document is available under the terms of the GNU Free Documentation License. See the licensing terms for further details.