Design: 04.01.05/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 interiors
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
INTERIOR OF SELF-OVERLAPPING FILL AREAS: All the squares should
contain a multi-point fill area with the interior filled.
Identify the fill area whose interior is filled differently from
that of the others.
INTERIOR OF CONCAVE FILL AREAS: Same as INTERIOR OF
SELF-OVERLAPPING FILL AREAS, 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 areas for all tests
*** *** *** interior of self-overlapping polygon *** *** ***
fillok = true
set up coordinates for overlapping 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 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 AREAS: 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 interior of a self-overlapping fill area should be
filled correctly."
pass/fail depending on (fillok)
*** *** *** interior of concave spiral polygon *** *** ***
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 AREAS: 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 interior of a concave spiral fill area should be
filled correctly."
pass/fail depending on (fillok)
end_it_all:
END PROGRAM 3