Design: 04.01.06/P03
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 3: Appearance of fill area set interiors
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
INTERIOR OF SELF-OVERLAPPING FILL AREA SETS: All the squares
should contain a multipoint fill area set with the interiors
filled. Identify the fill area set whose interior is filled
different from that of the others.
INTERIOR OF CONCAVE FILL AREA SETS: Same as INTERIOR OF
SELF-OVERLAPPING FILL AREA SETS, above.
DESIGN:
<inquire interior facilities> to determine if
solid, hatch, pattern interior style is supported:
if (SOLID, HATCH, or PATTERN is not available)
message: cannot test interior filling algorithm
goto end_it_all
endif
if (HATCH available) then
ihat = hatch style picked by operator, preferably dense and
diagonal
endif
if (PATTERN available) then
ipat = 1
define pattern #ipat as simple checkerboard pattern
set pattern size to reasonable value
endif
Divide screen up into 6 square labelled area sets for all tests
*** *** *** interior of self-overlapping fill area set *** *** ***
fillok = true
The border of each subarea denoted by same digit. "F" indicates
should be filled, "N" not filled.
11111111111111111111111111111
1 1
1 F 1
1 11111111111111111 1
1 1 1 1
1 1 N 222222+22222+2222222222
1 1 2 1 1 2
1 1 2 F 1 N 1 2
1 1 2 1 1 2
1 1 222222222222+22222+22222 2
1 1 2 2 1 1 2 2
1 1 2 F 2 N 1 F 1 2 2
1 1 2 2 1 1 2 2
1 1111+11111+111111111111 2 2
1 2 2 1 2 2
1 2 N 2 F 1 2 2
1 2 2 1 2 2
1111111111+11111+111111 N 2 2
2 2 2 2
2 2 2 2
2 222222222222222222 2
2 2
2 F 2
2 2
22222222222222222222222222222
for each available intsty = SOLID, HATCH, PATTERN
ran6 = random order for 1-6
set interior style = intsty
if (intsty=HATCH) then
set interior style index = ihat
elseif (intsty=PATTERN) then
set interior style index = ipat
endif
for ix = 1 to 6
this = ran6(ix)
this:
1 - simulate the figure, filling in the wrong interiors
2 - simulate the figure, filled correctly
3 - generate the overlapping 3D fill area
4 - generate the overlapping 3D fill area,
reverse order of point list
5 - generate the overlapping 2D fill area
6 - generate the overlapping 2D fill area,
reverse order of point list
next ix
OPQA/INTERIOR OF SELF-OVERLAPPING FILL AREA SETS: Which figure
is different?
if (operator selects #1) then
OK so far
else
fillok = false
message about failure for intsty
endif
next intsty
TEST: #SR 1 4 7 8
"The interiors of a self-overlapping fill area set
should be filled correctly."
pass/fail depending on (fillok)
*** *** *** interior of concave fill area set *** *** ***
fillok = true
set up coordinates for spiral fill area
for each available intsty = SOLID, HATCH, PATTERN
ran6 = random order for 1-6
set interior style = intsty
if (intsty=HATCH) then
set interior style index = ihat
elseif (intsty=PATTERN) then
set interior style index = ipat
endif
for ix = 1 to 6
this = ran6(ix)
this:
1 - simulate the figure, filling in the wrong interiors
2 - simulate the figure, filled correctly
3 - generate the spiral 3D fill area
4 - generate the spiral 3D fill area,
reverse order of point list
5 - generate the spiral 2D fill area
6 - generate the spiral 2D fill area,
reverse order of point list
next ix
OPQA/INTERIOR OF CONCAVE FILL AREA SETS: Which figure is
different?
if (operator selects #1) then
OK so far
else
fillok = false
message about failure for intsty
endif
next intsty
TEST: #SR 1 4 7 8
"The interiors of a concave spiral fill area set should be
filled correctly."
pass/fail depending on (fillok)
end_it_all:
END PROGRAM 3