All global data types and constants are declared in the module d3_global.h. The basic data types are
typedef float vector[4] the definition of a vectorThe following data type is used for the z-buffer algorithm of the unit surfaces:typedef float matrix[4][4] the definition of a matrix
typedef vector cube[9] the corner points of a cube (unit),
as well as the center
typedef struct {
int n;
int mask;
vector vert[4];
} d3_polygon_type;

The following data type is used for the values that can be represented by a unit:
typedef struct {
int size;
int color;
int top_label;
int bottom_label;
} d3_unit_mode_type;

The fields may each contain one of the constants: activation_on, init_act_on, output_on, bias_on, name_on, number_on, zvalue_on or nothing_on. The light source is described by the following declaration:
typedef struct {
int shade_mode;
vector position;
float Ia, Ka, Ip, Kd;
} d3_light_type;

The whole status of the network display is contained in:
typedef struct {
vector trans_vec, rot_vec, scale_vec;
vector trans_step, rot_step, scale_step;
vector viewpoint;
float unit_aspect;
float link_scale;
float pos_link_trigger;
float neg_link_trigger;
int font;
int projection_mode;
int color_mode;
int link_mode;
d3_unit_mode_type unit_mode;
d3_light_type light;
} d3_state_type;

The global variables are located in the module d3_global.c. Most of them are initialized with default values.
The variables
Display *d3_display; Window d3_window; GC d3_gc; int d3_screen;
address the display window of Xlib (the data types Display, Window and GC are declared in Xlib).
int d3_displayXsize; int d3_displayYsize;
contain the current size of the display window.
bool d3_displayIsReady; bool d3_controlIsReady;
specify, whether the display window and the control panel are created.
bool d3_freeze;
specifies, whether updates are possible in the display window.
int d3_fontXsize; int d3_fontYsize;
specify the size of the current character set used to label the units and links.
int d3_numberWidth; int d3_shortNumberWidth;
specify the width of float and short int in the X Window dialogue widgets.
struct TransTable *d3_xyTransTable;
is a pointer to the 2D
3D translation table. The table
itself is declared in the kernel.
int d3_transOffset;
specifies the offset for zero in the table. This is necessary, since C does not allow negative indices.
d3_state_type d3_state;
contains the status of the network display (see d3_state_type)
cube d3_e_cube;
contains the corner points of the standard cube. The cube is moved by the vector (-0.5, -0.5, -0.5) to be centered in the coordinate system.
int d3_cube_lines[12][2];
contains the twelve edges of a cube. The numbers are used as indices to d3_e_cube.
int d3_vertex_index[6][4];
contains the six planes of a cube. The numbers are also used as indices to d3_e_cube