Next: 5 Graphics
Up: 4 Creating a 3D image
Prev: 4.5 3D graphics instructions
Contents
The notion of text within the 3D space needs to be clarified. In this context, we can distinguish between two types of texts: the graphics text and description text. The graphics text is the text which forms part of the picture and which is painted onto the surface. This text must therefore undergo all the transformations applied to the surface. The description text is the text whose origin (lower left corner of the first character) corresponds to a point in the space, but which is defined on the visualization surface in order to describe the object's graphical representation.
SUBROUTINE TXT3D(STRING, NB, X, Y, Z) CHARACTER*(*) STRING INTEGER NB REAL X, Y, Z
plots the text consisting of NB characters contained in array STRING (description text), beginning at the projection of point with coordinates (X, Y, Z) onto the visualization surface The current cursor position becomes position (X, Y, Z).
SUBROUTINE STRSFT(TEXT,NBCHAR,POSIT,DIRECR,DIRBAS,ANGSHR,L,H, SEG,POL) CHARACTER*(*) TEXT REAL POSIT(3), DIRECR(3), DIRBAS(3), ANGSHR, L, H EXTERNAL SEG, POL
plots text (graphics) TEXT of NBCHAR characters positioned at POSIT, where:
SUBROUTINE SEG(X1, Y1, X2, Y2) REAL X1, Y1, X2, Y2This subroutine must be supplied by the user. The simplest case corresponds to, for the 2D case:
CALL MOV2TO(X1, Y1) CALL LIN2TO(X2, Y2)
and, for the 3D case:
CALL MOV3TO(X1, Y1, 0. ) CALL LIN3TO(X2, Y2, 0. )
However, the subroutine can be defined to plot other types of lines (dotted, cylindrical volume, waves, ...). The characters will then be plotted with this line definition.
#$%`()*+, -./0123456789=? ABCDEFGHIJKLMNOPQRSTUVWXYZ
`()*+, -./0123456789=? ABCDEFGHIJKLMNOPQRSTUVWXYZ
!"#$%&`~()*+, -./0123456789:;<=>? ABCDEFGHIJKLMNOPQRSTUVWXYZ^@ abcdefghijklmnopqrstuvwxyz
Subroutine STRSFT is common to libraries 2D and 3D.