Design: 06.01.02/P04
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 4: Effect of local and global transformations in a
single structure
CHARACTERISTICS: nnnn
OPERATOR SCRIPT: passive test.
DESIGN:
Set up arbitrary matrices:
A1 = | 0.6400 -0.3405 -0.3458 -0.2107 |
| -0.2158 0.9041 -0.1908 0.2571 |
| -0.3232 -0.1562 0.6289 -0.1183 |
| -0.1398 0.2284 -0.2234 1.3633 |
A2 = | 0.7066 -0.0907 -0.3822 -0.1183 |
| 0.2092 0.7405 0.1112 -0.1777 |
| -0.0416 -0.1633 0.6808 0.0448 |
| -0.3792 -0.2249 0.0086 0.9750 |
A3 = | 0.7061 -0.2344 0.2709 0.3407 |
| -0.2336 0.8280 0.0524 0.3902 |
| -0.2953 -0.2632 0.6326 0.1875 |
| -0.2673 -0.2501 -0.1435 1.2520 |
A4 = | 0.8168 0.1839 0.1461 0.0835 |
| -0.2033 1.1356 0.0644 -0.1778 |
| -0.3886 -0.3802 0.7139 -0.3036 |
| -0.2358 -0.3262 0.2245 0.8549 |
A5 = | 0.6428 -0.2039 0.3480 -0.2744 |
| 0.3743 1.3347 -0.2931 -0.2590 |
| 0.1195 -0.0378 1.3423 0.0819 |
| 0.0006 0.1513 0.2051 1.2317 |
A6 = | 0.9153 0.0327 0.3814 |
| 0.3884 1.3789 0.0693 |
| 0.3859 -0.3846 0.9099 |
A7 = | 0.9528 0.3002 -0.2830 |
| 0.1134 1.2937 0.3916 |
| -0.3495 0.1857 0.8847 |
Set up structure #101:
01: polymarker 3 at 3,4,5
02: local transformation 3 with A1, replace
03: polymarker 3 at 3,4,5
04: local transformation 3 with A2, postconcatenate
05: polymarker 3 at 3,4,5
06: local transformation 3 with A3, preconcatenate
07: polymarker 3 at 3,4,5
08: global transformation 3 with A4
09: polymarker 3 at 3,4,5
10: local transformation 3 with A5, replace
11: polymarker 3 at 3,4,5
12: global transformation with A6 (2 dimensional)
13: polymarker 3 at 3,4,5
14: local transformation with A7, postconcatenate (2 dimensional)
15: polymarker 3 at 3,4,5
Throughout, use incremental spatial search (ISS) to test the
effects of the current global and local modelling
transformations. The search reference point (srp) is based on an
MC location of (3,4,5), adjusted to account for the expected
transformation.
TEST: #SR 16 17 19
"At the start of a traversal, the current global and local
modelling transformations should both be set to the
identity matrix."
perform ISS, with srp based on
expected composite transformation = identity matrix
pass/fail depending on (found path = 101,1)
TEST: #SR 8 16 17
"<Set local transformation 3>, with REPLACE, should replace
the current local modelling transformation with the
specified matrix."
perform ISS, with srp based on
expected composite transformation = A1
pass/fail depending on (found path = 101,3)
TEST: #SR 8 16 17
"<Set local transformation 3>, with POSTCONCATENATE, should
replace the current local modelling transformation with
the product of the specified matrix and its former
value."
perform ISS, with srp based on
expected composite transformation = A2 x A1
pass/fail depending on (found path = 101,5)
TEST: #SR 8 16 17
"<Set local transformation 3>, with PRECONCATENATE, should
replace the current local modelling transformation with
the product of its former value and the specified
matrix."
perform ISS, with srp based on
expected composite transformation = A2 x A1 x A3
pass/fail depending on (found path = 101,7)
TEST: #SR 15 16 17
"<Set global transformation 3> should replace the current
global modelling transformation with the specified
matrix."
perform ISS, with srp based on
expected composite transformation = A4 x A2 x A1 x A3
pass/fail depending on (found path = 101,9)
TEST: #SR 8 16 17
"<Set local transformation 3>, with REPLACE, should be able
to replace the current local modelling transformation with
the specified matrix several times in one structure."
perform ISS, with srp based on
expected composite transformation = A4 x A5
pass/fail depending on (found path = 101,11)
TEST: #SR 15 16 17 18
"<Set global transformation> should replace the current
global modelling transformation with the suitably expanded
version of the specified matrix."
perform ISS, with srp based on
expected composite transformation = expanded-A6 x A5
pass/fail depending on (found path = 101,13)
TEST: #SR 8 16 17 18
"<Set local transformation>, with POSTCONCATENATE, should
replace the current local modelling transformation with
the product of the suitably expanded version of the
specified matrix and its former value."
perform ISS, with srp based on
expected composite transformation = expanded-A6 x expanded-A7 x A5
pass/fail depending on (found path = 101,15)
END PROGRAM 4