surfplt - 3D surface plot with OpenGL of a matrix with real elements
surfplt |
[-a alpha] [-c height] [-h] [-m angle sleep] [-w] [-s sleep] [file] |
The surfplt(1) program draws a three dimensional surface of the given matrix data using OpenGL with a wireframe or a rendered solid surface. The surface can be animated. The input data is read from standard input or from the specified file in ASCII format. The input file structure is quite simple.
The following
options can be given.
-a alpha
Enable alpha blending. That means that the surface is translucent with an alpha value between 0.0 and 1.0.
-c height
Set the vertical camera position. The default value is 0.7.
-h |
Print help text and exit. |
-m angle sleep
Rotate the cube in steps of angle in degrees with sleep time sleep in milliseconds.
-w |
Draw surface with a wireframe and do not render. |
-s sleep
Set the time steps in the animation to sleep milliseconds.
The input file is read from standard input or from the specified file. The head of the file can contain comment lines, which start with an ’#’ character.
First, you can include the axes labels.
xlabel "label"
ylabel "label"
zlabel "label"
box x y z
This decribes the length of the sides of the three dimensional box in which the plotting is done. The default values are 1.0 1.0 1.0. The next expression is:
animate nt
This statement tells surfplt(1) to read in nt data blocks, one for each time step. If this statement is not given, no animation is done.
data nx ny z-value ...
This is the matrix with z-values. There have to be nx * ny z-values following the data statement. nx is the number of indices in x-direction and ny the number of indices in y-direction. The x-index varies faster than the y-index in this sequence of z-values.
This program was written by Ralph Trenkler <ralph-trenkler(at)t-online.de>.