Design: 06.02.01/P02
This is an abstract, language-independent design. Grim
details may be found in the
corresponding source code.
You may return to the
documentation
for the module containing this program design, or to the
entire hierarchical table of
topics covered by the PVT.
PROGRAM 2: Behavior of 3D mapping
CHARACTERISTICS: nnnn
OPERATOR SCRIPT: passive test.
DESIGN:
*** *** *** *** *** *** *** *** *** ***
Set 3D mapping parameters for PARALLEL projection:
UMIN, UMAX, VMIN, VMAX = -462.27, -80.95, -4891.85, -94.78
XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX =
0.2640, 0.4082, 0.01339, 0.7457, 0.1395, 0.30036
PRP = -15.044, 1.318, 34.873
VPD = -1.213
BPD = -3.311
FPD = 15.332
TEST: #SR 1 2 7 8 9
"<Evaluate view mapping matrix 3> should map the corners of the
view volume to the corresponding corners of the projection
viewport for a PARALLEL projection."
pass/fail depending on results of TSTCOR subroutine (see below)
TEST: #SR 1 2 10
"<Evaluate view mapping matrix 3> should map any two points
on a given projector to the same x and y values in NPC
space for a PARALLEL projection."
pass/fail depending on results of TSTPRJ subroutine (see below)
*** *** *** *** *** *** *** *** *** ***
Set 3D mapping parameters for PERSPECTIVE projection:
UMIN, UMAX, VMIN, VMAX = -462.2236, -11.39577, -4860.530, 2.2558320E-02
XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX =
0.10639, 0.22243, 0.10012, 0.15392, 0.24695, 0.88262
PRP = -3.6054E-02, 2.1181E-03, 3.0569
VPD = 0.16487
BPD = -5.2858E-03
FPD = 3.0531
TEST: #SR 1 2 7 8 9
"<Evaluate view mapping matrix 3> should map the corners of the
view volume to the corresponding corners of the projection
viewport for a PERSPECTIVE projection."
pass/fail depending on results of TSTCOR subroutine (see below)
TEST: #SR 1 2 10
"<Evaluate view mapping matrix 3> should map any two points
on a given projector to the same x and y values in NPC
space for a PERSPECTIVE projection."
pass/fail depending on results of TSTPRJ subroutine (see below)
*** *** *** *** *** *** *** *** *** ***
Set 3D mapping parameters for PARALLEL projection, with flat
viewport (ZMIN = ZMAX):
UMIN, UMAX, VMIN, VMAX = -2.6073, 231.673, 830.654, 4.74075E+4
XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX =
0.30322, 0.54641, 0.28099, 0.68383, 6.0076E-03, 6.0076E-03
PRP = 3.8497, 72.490, -111.363
VPD = -0.38069
BPD = -0.46296
FPD = -4.25281E-02
TEST: #SR 1 2 7 8 9
"<Evaluate view mapping matrix 3> should map the corners of the
view volume to the corresponding corners of a flat projection
viewport for a PARALLEL projection."
pass/fail depending on results of TSTCOR subroutine (see below)
TEST: #SR 1 2 10
"<Evaluate view mapping matrix 3> should map any two points
on a given projector to the same x and y values in NPC
space for a flat projection viewport and a PARALLEL
projection."
pass/fail depending on results of TSTPRJ subroutine (see below)
*** *** *** *** *** *** *** *** *** ***
Set 3D mapping parameters for PERSPECTIVE projection, with a flat
viewport (ZMIN = ZMAX) and view volume (BPD = FPD):
UMIN, UMAX, VMIN, VMAX = -1.7800E-03, 7.5534E-02, -1.5509, 8779.861
XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX =
0.15580, 0.537, 1.7186E-03, 0.3148, 0.73940, 0.73940
PRP = -1.8005, -4.19006E-02, 6.3462,
VPD = 0.831
BPD = -2.1753
FPD = -2.1753
TEST: #SR 1 2 7 8 9
"<Evaluate view mapping matrix 3> should map the corners of a
flat view volume to the corresponding corners of a flat
projection viewport for a PERSPECTIVE projection."
pass/fail depending on results of TSTCOR subroutine (see below)
TEST: #SR 1 2 10
"<Evaluate view mapping matrix 3> should map any two points
on a given projector to the same x and y values in NPC
space for a flat view volume, a flat projection viewport,
and a PERSPECTIVE projection."
pass/fail depending on results of TSTPRJ subroutine (see below)
---------------------------------------------------------------
TSTCOR subroutine:
compute actvv = actual values for view volume corners,
compute exppr = expected values for projection viewport corners,
use <Evaluate view mapping matrix 3> to determine
trnf = transformation matrix
apply trnf to actvv to determine
actpr = actual values for projection viewport corners
pass/fail corners test depending on (actpr approx= exppr)
TSTPRJ subroutine:
compute VRC projector passing thru view window center
pick two points on projector
apply trnf to projector points to determine
centx1, centy1, centz1 = 1st transformed center point
centx2, centy2, centz2 = 2nd transformed center point
pass/fail projector test depending on
(centx1 approx= centx2 and centy1 approx= centy2)
END PROGRAM 2