3
Creation of the
Scene
Creating
the scene can be considered as the first part of a PHIGURE display program. It
involves building the objects of the scene, using PHIGURE functions. The
objects thus generated are stored as PHIGS structures, designated in the
application by their identifier (hereafter called STRID). PHIGURE has five
types of structure-building functions:
1) Structure creation functions:
The first parameter of all structure creation functions is STRID, the
identifier of the structure to create. The value of this identifier is left to
the choice of the application program. Since PHIGURE is based on the PHIGS
standard, it uses the capability offered by the standard to create structures
that make references to other structures. Therefore, certain functions create
only one structure, whereas others automatically create a set of N
substructures, all referenced from the main structure. These substructures will
have as their identifiers STRID+1, STRID+2 and so on to STRID+N. This gives a
network of N+1 structures in the form of a two-level tree configuration whose
root is the structure STRID. In other words, the root structure can be created
and referenced with the identifier STRID and its N associated substructures can
be referenced with the identifiers STRID+1 through STRID+N.
PHIGURE function creating several structures:
1st parameter: STRID, identifier of the tree's root structure
following parameters: geometrical description of the substructures

All structures this created are stored as PHIGS structures, that is, as
a series of structure elements complying to the PHIGS standard. Structures
generated by PHIGURE all have the following architecture ;

Each rectangle in the figure above corresponds to a set of primitives
making up an indivisible graphic entity. The presence of "labels" in the
structure, just before a group of primitives, allows the PHIGURE user to
personalize these structures, either by using the modification functions
described in chapter "Graphic Attributes of Structures", or, for those fully
familiar with the PHIGS standard, by editing the structure. By inserting these
"labels," PHIGURE makes it possible to create structures which can be modified
by the user at will.
2) Parameterization functions for defining a single
structure:
The parameterization functions do not create structures, but specify the
options that will be used to build the structure. They must be called before
calling the function which creates the structure. For example, there is a
function which defines options such as the position of graduations on an axis,
the direction in which a label is written, etc. Since these options are only
valid for a single structure, the first parameter of the parameterization
functions is STRID, the identifier of the related structure. If no
parameterization functions are called before creation of the structure,
predefined options will be used.
e.g. tset_axis_label function
3) Query functions for obtaining the selected structure-building
parameters:
The query functions have a purpose opposite that of the parameterization
functions - they inform the application program about the options selected to
build a structure. Their first parameter is STRID, the structure's identifier.
They may be called either before or after creation of the structure. Query
functions can be used, for example, to obtain values of predefined options, but
are especially useful for programs in which structure options are modified as a
function of previous values.
e.g. tinq_axis_label function
4) Parameterization functions for defining a set of structures of the same
type:
These functions do not create structures, but specify the options to be used to
build all subsequent structures of the same type. They must be called before
the creation of structures because the options they select have no predefined
values. For example, a function which defines the number of isovalues for the
set of structures representing graphics as a function of the level of values.
e.g. tset_isoval_list, tfloat_format functions
5) Modification functions for changing an existing structure:
The modification functions are used to modify structures. They modify
structures by inserting a PHIGS primitive attribute at a given label. For
example, an application calls a function that defines the text colour for the
specified structure. The inserted PHIGS attribute, which controls the text
colour, will only affect the text primitives following the given label. The
first parameter for this class of PHIGURE functions is STRID, the identifier of
the structure to be modified (see the chapter on "Graphic attributes of
structures").
e.g. tset_linetype function
Organisation of the scene-creation part of the application
The scene-creation part of a program must begin a call to a function defining
the 2D or 3D user space (tdomain or tdomain3). This space
corresponds to the smallest rectangle, in 2D, or the smallest parallelepiped,
in 3D, containing the user's data. The scene-creation part continues by
calling the PHIGURE object creation functions, and ends by calling the function
tscene , which gives an identifier to the constructed scene and specifies the
list of structures which must be taken into account in the scene (not all
structures will necessarily have to be visualized in the scene at the same
time). The tscene function also specifies a number identifying the view in
which the created scene will be visualized. The view identified by this number
will be defined in the visualization part of PHIGURE.
Example: Creation of a 2D scene with identifier 12, including structures with
identifiers 4, 5 and 6, visualized in view number 1.

If a set of structures is to be visualized simultaneously from two
different viewpoints, just call the tscene function twice with two different
scene identifiers and two different view numbers, but with the same list of
structures. The structures do not have to be created twice, which saves memory
and computation time.