Design: 04.01.06/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: Appearance of fill area sets
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
DEGENERATE FILL AREA SETS: Some of the 6 labelled squares contain
a fill area set with zero-, one-, or two-point subareas. Others
contain a visible primitive (including a single dot polylmarker).
Identify all the squares in which no primitive is visible.
ORDER OF VERTICES: All the squares except one should contain a
closed rectangle and pentagon. Identify the square that does not
contain these figures.
FILL AREA SET CLOSURE: All the squares should contain a closed
pentagon. Some fill area sets are explicitly closed, others are
implicitly closed. Identify the pentagon which is not closed.
GEOMETRY OF 3D FILL AREA SETS: All the squares should contain a
fill area set with multiple vertices. All but one should have
their vertices accurately circled by a polymarker. Identify the
fill area set which is not accurately marked.
GEOMETRY OF 2D FILL AREA SETS: Same as GEOMETRY OF 3D FILL AREA
SETS, above.
DESIGN:
set polymarker scale factor to reasonable size = 0.02 in WC
use interior style HOLLOW throughout
Divide screen up into 6 square labelled area sets for all tests
sider = list of 6 sides from which cube may be viewed =
front,back,left,right,top,bottom
TEST: #SR 1 4 7
"A <fill area set> or <fill area set 3> subarea with fewer
than three points should have no visual effect."
ran6 = random order for 1-6
numemp = number of empty squares = random from 2 to 4
for ix = 1 to 6
this = ran6(ix)
if (this > numemp+1) then
draw a single dot polymarker in square #ix
elseif (this = numemp+1) then
draw a single line segment in square #ix
elseif (this = numemp) then
draw a 2D fill area set with 0, 1, and 2 point subareas in
square #ix
elseif (this = numemp-1)
draw a two point 3D fill area set in square #ix
else
draw a 3D fill area set with 0, 1, and 2 point subareas in
square #ix
endif
next ix
OPQA/DEGENERATE FILL AREA SETS: List all the empty squares.
pass/fail depending on:
(operator identifies the squares with zero, one, or two point
fill area sets)
TEST: #SR 1 4 7
"A <fill area set> or <fill area set 3> primitive with multiple
vertices should be rendered as a collection of subareas. Each
subarea should be rendered by connecting the points in the order
that the points are given in the point list."
ran6 = random order for 1-6
for ix = 1 to 6
this = ran6(ix)
this:
1 - use polylines to draw a rectangle and a 5 point star
2 - draw 2D rectangle and pentagon, clockwise
3 - draw 2D rectangle and pentagon, counterclockwise
4 - draw 3D rectangle and pentagon, clockwise
5,6 - draw 3D rectangle and pentagon, counterclockwise
next ix
OPQA/ORDER OF VERTICES: Which square does NOT contain a closed
rectangle and pentagon?
pass/fail depending on (operator identifies square with star)
TEST: #SR 1 4 7
"The subareas with a list of more than two points in a
<fill area set> or <fill area set 3> primitive should be
rendered as closed polygonal areas."
ran6 = random order for 1-6
one subarea per fill area set for this test
for ix = 1 to 6
this = ran6(ix)
this:
1 - draw a pentagon with polyline and leave one side open
2 - draw 3D pentagon with 6 points (explicit close, last=first point)
3 - draw 2D pentagon with 6 points (explicit close, last=first point)
4 - draw 2D pentagon with 5 points (implicit close)
5,6 - draw 3D pentagon with 5 points (implicit close)
next ix
OPQA/FILL AREA SET CLOSURE: Which pentagon is open?
pass/fail depending on (operator identifies pentagon with open side)
TEST: #SR 1 4 7
"The appearance of a <fill area set 3> primitive should reflect
its 3D geometry after being transformed."
ngsq = no-good square = random integer from 1 to 6
set up fill area set with a triangle and a pentagon as subareas
for each coordinate, z = .5*x + .5*y
for ix = 1 to 6
rotate to view from sider(ix)
display the 3D fill area set in square #ix
calculate expected position of vertices
if (ix = ngsq) then
distort expected vertices
endif
use 2D circle polymarker to mark expected vertices
next ix
OPQA/GEOMETRY OF 3D FILL AREA SETS: Which fill area set does NOT
have all its vertices circled?
pass/fail depending on (operator identifies square #ngsq)
TEST: #SR 1 4 7
"The appearance of a <fill area set> primitive should reflect
its 2D geometry after being transformed."
ngsq = no-good square = random integer from 1 to 6
set up fill area set with a triangle and a pentagon as subareas
(same x,y coordinates as above)
for ix = 1 to 6
rotate 45 degrees around x and y axis into unit cube to show
z-values
rotate to view from sider(ix)
display the 2D fill area set in square #ix
calculate expected position of vertices
if (ix = ngsq) then
distort expected vertices
endif
use 2D circle polymarker to mark expected vertices
next ix
OPQA/GEOMETRY OF 2D FILL AREA SETS: Which fill area set does NOT have
all its vertices circled?
pass/fail depending on:
(operator identifies square #ngsq)
END PROGRAM 2