Next: 7.3 Particular displays
Up: 7 Internal programs
Prev: 7.1 Interrogation subroutines
Contents
SUBROUTINE POSIT(XIN, YIN, XOUT, YOUT, I) REAL XIN, YIN, XOUT, YOUT INTEGER I
This subroutine converts the object's coordinates into centimeters on the screen, or
the inverse.
On entry: XIN, YIN
On exit: XOUT, YOUT
If I=0: XIN, YIN point in the user space
XOUT, YOUT homologue in centimeters
If I=1: XIN, YIN in centimeters
XOUT, YOUT homologue in the user space
If I=2: XOUT, YOUT current point in the user space.
The subroutines which follow are used to define a point and line positions in relation to the mask defined for the object:
SUBROUTINE QFEN(RECTI, F, RECT) REAL RECTI(4), RECT(4), F(4)
calculates the largest rectangle homologous to RECTI in F.
Input:
RECTI: initial rectangle (only the dx and dy are important) and
F: rectangle in which it is contained.
Output: RECT: rectangle homologous to RECTI contained in F.
SUBROUTINE QMSQ(MASQUI, F, MASQUE) REAL MASQUI(4), MASQUE(4), F(4)
calculates a non-deforming mask to view MASQUI in window F.
Input:
MASQUI: initial mask and
F: window in which we want to view.
Output: MASQUE: non-deforming mask for the window.
SUBROUTINE SCSPT2(P, MASQ, FREJET) REAL MASQ(4) REAL P(4) LOGICAL FREJET
MASQ is a rectangular mask defined by:
MASQ(1) = XMIN
MASQ(2) = XMAX
MASQ(3) = YMIN
MASQ(4) = XMAX
P(1:2) are the coordinates of a point in the 2D space
P(3) = 0.
P(4) = 1.
On exit we have:
FREJET =.TRUE. : P is not inside the rectangle defined by MASQ.
FREJET =.FALSE. : P is inside the rectangle defined by MASQ.
SUBROUTINE SCSPT3(P, MASQ, FREJET) REAL P(4), MASQ(6) LOGICAL FREJET
MASQ is a parallelopipedic mask defined by:
MASQ(1) = XMIN
MASQ(2) = XMAX
MASQ(3) = YMIN
MASQ(4) = XMAX
MASQ(5) = ZMIN
MASQ(6) = ZMAX
P(1:3) are the point coordinates in the 3D space.
P(4) = 1.
On exit we have:
FREJET =.TRUE. P is not inside the parallolepiped by MASQ.
FREJET =.FALSE. P is inside the parallelopiped defined by MASQ.
SUBROUTINE SCSO2D(P1, P2, MASQ, FREJET, FCLIP2) REAL P1(4), P2(4), MASQ(4) LOGICAL FREJET, FCLIP2
MASQ is a rectangular mask defined by:
MASQU(1) = XMIN
MASQU(2) = XMAX
MASQU(3) = YMIN
MASQU(4) = XMAX
P1(1:3), P2(1:3) define a segment
P1(4) = 1.
P2(4) = 1.
On exit we have:
P1 and P2: The extremities of the part of the segment which falls inside the rectangle defined by MASQ.
FREJET =.TRUE. if no point of the segment falls inside the rectangle;
FALSE. if not.
FCLIP2 =.TRUE. if point P2 is falls outside the rectangle;
FALSE. if not.
SUBROUTINE SCSO3D(P1, P2, MASQ, FCLIPZ, FREJET, FCLIP2) REAL P1(4), P2(4), MASQ(4) LOGICAL FREJET, FCLIP2, FCLIPZ
MASQ is a parallelopipedic mask defined by:
MASQU(1) = XMIN
MASQU(2) = XMAX
MASQU(3) = YMIN
MASQU(4) = XMAX
Depending on the case under consideration:
MASQU(5) = ZMIN
MASQU(6) = ZMAX
P1(1:3), P2(1:3) define a segment
P1(4) = 1.
P2(4) = 1.
This subroutine performs a pyramidal splitting of segment P1 P2.
Let us assume that we return to the normal case where the observer is positioned at the origin and looks in the negative Z direction (see the description of subroutine NRMLST).
The vision pyramid is limited by planes X-Z=0, X+Z=0, Y+Z=0, Y-Z=0., where:
P1 and P2 contains the extremities of the part of the segment inside the cone.
FCLIPZ =.TRUE. : the cone is, in addition, limited by the planes:
Z = MASQ(5)
Z = MASQ(6)
FREJET =.TRUE. if no point in the segment falls inside the cone
FALSE. if not
FCLIP2 =.TRUE. if point P2 is outside the cone
FALSE. if not
SUBROUTINE SCSC3D(P1, P2, MASQ, FREJET, FCLIP2) REAL P1(4), P2(4), MASQ(4) LOGICAL FREJET, FCLIP2
performs a split of segment P1 P2 by a rectangular parallelopiped.
MASQ is a parallelopipedic mask defined by:
MASQU(1) = XMIN
MASQU(2) = XMAX
MASQU(3) = YMIN
MASQU(4) = XMAX
Depending on the case under consideration:
MASQU(5) = ZMIN
MASQU(6) = ZMAX
P1(1:3), P2(1:3) define a segment
P1(4) = 1.
P2(4) = 1.
On return we have:
P1 and P2: the extremities of the part of the segment which falls inside the parallelopiped.
FREJET =.TRUE. if no point of the segment falls inside the parallelopiped;
FALSE. if not.
FCLIP2 =.TRUE. if point P2 is outside the parallelopiped.
FALSE. if not.
LOGICAL FUNCTION APPART(A, B, X, Y, DX, DY) REAL A, B, X, Y, DX, DY
Does the point A, B fall inside the rectangle X, Y, DX, DY? If yes APPART becomes .TRUE.
LOGICAL FUNCTION TSTRJT(I)
returns the value of FREJET after calling LIN2TO or LIN3TO.
.TRUE. if the line is rejected completely.
I is a fictitious argument.
LOGICAL FUNCTION TSTRJX(I)
checks if the text is rejected or not .
.TRUE. if totally rejected or rejection of the 2 extremity.
I is a fictitious argument.
SUBROUTINE SHUNT2(LOGIC) LOGICAL LOGIC
If LOGIC=.TRUE., the generation of the graphics code for 2D images is not executed (LIN2TO, MOV2TO,... ,2D library,...).
Subroutine ACTIO2 is executed instead:
SUBROUTINE ACTIO2(X1, Y1, X2, Y2) REAL X1, X2, Y1, Y2
This is a user subroutine . The coordinates (X1, Y1) and (X2, Y2) are in centimeters. It retrieves what was plotted without SHUNT2.
SUBROUTINE SHUNT3(LOGIC) LOGICAL LOGIC
If LOGIC=.TRUE. the generation of the graphics code for 3D images is not executed (LIN3TO, MOV3TO,..., 3D library,...)
Subroutine ACTIO3 is executed instead:
SUBROUTINE ACTIO3(X1, Y1, Z1, X2, Y2, Z2) REAL X1, Y1, Z1, X2, Y2, Z2
This subroutine is written by the user . The coordinates (X1, Y1, Z1) and (X2, Y2, Z2) are in centimeters. It retrieves what was plotted without SHUNT3.