Modulefpreviousupnextcontents[BIG][Normal][small]
Next: 4 Creating a 3D image Up: 3 Creating a 2D image Prev: 3.1 Masks and windows Contents


3.2 Graphics instructions: 2D

The objects described using the following subroutines will only be affected by the definition of MASQU2 and FENTR2. The current position in 2D is independent of that in 3D.

As seen in the presentation, the objects are described in the user's own coordinate system (we now know that it corresponds to choosing the appropriate mask).

The coordinates are expressed in single precision real numbers, the origin being situated at (0., 0.). They are defined with respect to a direct orthogonal axis system.

The subroutines in which the plot type is specified are described in Chapter 5, dealing with graphics.

The following subroutines constitute the catalogue of 2D objects:

Coloring-in of surfaces:

      SUBROUTINE POLY2F(X, Y, NB, CFAC, CCONT, IFLAG)
      INTEGER NB, CFAC, CCONT, IFLAG
      REAL X(NB), Y(NB)

where:

X(1:NB), Y(1:NB): Coordinates of the   vertices   of the polygon; NB: Number of polygon vertices (NB < 50); CFAC: Number of the facet color; CCONT: Number of the contour color; IFLAG: Plot option:

.
0: Plot facet only;
.
1: Plot contour only;
.
2: Plot facet and contour.

If the facet is convex, the clipping corresponding to the current mask will be correct. If the facet is not convex and if the non-convex part is cut by the current mask, there will be a slight default in this area (one line rejoining the two ends).

The subroutines utilized to specify the colors are described in Chapter 5.

Text:

The subroutine described below generates text  formed by "HARDWARE" characters. Another subroutine exits which caters for "SOFTWARE" characters, described in the chapter 4, devoted to 3D images.

      SUBROUTINE TXT2D(STRING, NB, X, Y)
      CHARACTER*(*) STRING
      INTEGER NB
      REAL X, Y

plots, beginning at   position (X, Y), the text consisting of NB characters contained in the character string STRING. The current cursor position becomes point (X, Y).

The subroutines to specify the size, direction, ..., of the text are detailed in Chapter 5, dealing with graphics.


Modulefpreviousupnextcontents[BIG][Normal][small]
Next: 4 Creating a 3D image Up: 3 Creating a 2D image Prev: 3.1 Masks and windows Contents