Abstract graphical data type

An abstract graphical data type (AGDT) is an extension of an abstract data type for computer graphics. AGDTs provide the advantages of the ADTs with facilities to build graphical objects in a structured way. Formally, an AGDT may be defined as a "class of graphical objects whose logical behavior is defined by a set of graphical characteristics and a set of graphical operations".

AGDTs were introduced in 1979 by Nadia Magnenat Thalmann and Daniel Thalmann.[1]

The most important tool in this graphical extension is the 3-D graphical type—the figure type. The syntax is described in Figure 2. The word "figure" is a keyword. The formal parameter section, the declaration, and the body are similar to the corresponding elements in a procedure.

To define a figure type, one must

  1. find the characteristics of the figure, which become the parameters;
  2. find the algorithm that allows the user to build the figure with the help of the parameters.

To build the figures, typical graphical statements should be used like: moveabs, moverel, lineabs, and linerel to draw vectors, and include to define an existing figure as part of a new one.

For example, a pyramid with four vertices can be defined as

type PYRAMID = figure (A, B, C, D: VECTOR);
begin
moveabs A; lineabs B, C, A, D, C;
moveabs B; lineabs D
end;

A tree can be defined by 3-D graphical types as

type TREE = figure (var BRANCHES: TEXT; NBRANCHES: INTEGER;
POSITION: VECTOR; HEIGHT, LENGTH:REAL);

where BRANCHES is a file of kinds of branches, NBRANCHES is the number of branches, POSITION is the position of the trunk, HEIGHT is the height of the trunk, and LENGTH is the length of the branches.

A forest of trees can be defined as

var FOREST: array [1..NBTREES] of TREE

Abstract graphical types have been implemented as an extension of the PASCAL programming language called MIRA-3D.[2]

References

  1. N. Magnenat Thalmann, D. Thalmann, Design and Implementation of Abstract Graphical Data Types, Proc. 3rd International Computer Software and Applications Conference (COMPSAC'79), IEEE, Chicago, USA, 1979, pp.519-524
  2. N. Magnenat-Thalmann, D. Thalmann, MIRA-3D: A Three-dimensional Graphical Extension of PASCAL, Software-Practice and Experience, Vol.13, 1983, pp.797-808
This article is issued from Wikipedia - version of the 10/30/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.