Design: 04.01.05/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 areas
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
DEGENERATE FILL AREAS: Some of the 6 labelled squares contain a
one- or two-point fill area, others contain a visible primitive
(including a single dot polymarker). Identify all the squares
in which no primitive is visible.
ORDER OF VERTICES: All the squares except one should contain a
closed regular pentagon. Identify the square that does not
contain a pentagon.
FILL AREA CLOSURE: All the squares except one should contain a
closed regular pentagon. Some fill areas are explicitly closed,
others are implicitly closed. Identify the pentagon which is not
closed.
GEOMETRY OF 3D FILL AREAS: All the squares should contain a fill
area with multiple vertices. All but one should have their
vertices accurately circled by a polymarker. Identify the fill
area which is not accurately marked.
GEOMETRY OF 2D FILL AREAS: Same as GEOMETRY OF 3D FILL AREAS,
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 areas 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> or <fill area 3> primitive 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 area #ix
elseif (this = numemp+1) then
draw a single line segment in area #ix
elseif (this = numemp) then
draw a two-point 2D fill area in area #ix
elseif (this = numemp-1)
draw a two-point 3D fill area in area #ix
else
draw a one-point 3D fill area in area #ix
endif
next ix
OPQA/DEGENERATE FILL AREAS: List all the empty squares (caution:
some squares may contain a dot-polymarker).
pass/fail depending on:
(operator identifies the squares with one- or two- point fill areas)
TEST: #SR 1 4 7
"A <fill area> or <fill area 3> primitive with multiple vertices
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 5 point star
2 - draw 2D regular pentagon, clockwise
3 - draw 2D regular pentagon, counterclockwise
4 - draw 3D regular pentagon, clockwise
5,6 - draw 3D regular pentagon, counterclockwise
next ix
OPQA/ORDER OF VERTICES: Which square does NOT contain a closed
regular pentagon?
pass/fail depending on (operator identifies square with the star)
TEST: #SR 1 4 7
"A <fill area> or <fill area 3> primitive with a list of more
than two points should be rendered as a closed polygonal
area."
ran6 = random order for 1-6
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 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 3> primitive should reflect
its 3D geometry after being transformed."
ngsq = no-good square = random integer from 1 to 6
generate 3D list of points, visually distinct from any side for
3D fill area, with 0 <= x <= y <=1, and z = .5x +.5y
for ix = 1 to 6
rotate to view from sider(ix)
display the 3D fill area 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 AREAS: Which fill area 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> primitive should reflect
its 2D geometry after being transformed."
ngsq = no-good square = random integer from 1 to 6
generate non-linear 2D list of points distinct from any side for
2D fill area
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 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 AREAS: Which fill area does NOT have
all its vertices circled?
pass/fail depending on (operator identifies square #ngsq)
END PROGRAM 2