Design: 04.01/P01

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 1: 2D polymarker and display space

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

LOCATION OF 2D POLYMARKER: The five polymarker types are
displayed, one at a time.  For each, measure and report the
distance in centimeters from the left and top edges of the
display space to the polymarker.

SIZE OF DISPLAY SPACE: There should be several polymarkers
displayed very close to each of the four edges of the entire
display space.  If the display space is not correctly delineated,
enter zero and explain the problem.   If the display space
appears to be correctly delineated, enter a list of four numbers
indicating how many markers are visible along its left, right,
bottom, and top edges, respectively.

DESIGN:

For all test cases:
set polymarker size to 1.0mm.
set view for entire display space

TEST: #SR 1
      "The location of 2D polymarkers should be determined by
       their associated modelling coordinates as modified by the
       transformation pipeline."

1,syxrat = x,y WC coordinates of right,top side of
           entire display space
draw outline of display space using polyline

rside = WC coordinate of right side of empty display space
if (dialogue area at right) then
   rside = left edge of dialogue area
else
   rside = 1
endif

bside = WC coordinate of bottom side of empty display space
if (dialogue area at bottom) then
   bside = top edge of dialogue area
else
   bside = 0
endif

lside = WC coordinate of left side of empty display space = 0
tside = WC coordinate of top side of empty display space = syxrat

for ix = all 5 polymarker types
    xloc = random from 0.1 to 0.9 between lside and rside
    yloc = random from 0.1 to 0.9 between bside and tside
    draw marker of type ix at xloc,yloc
    OPQA/LOCATION OF 2D POLYMARKER: Enter the distance, in
       centimeters, from the left edge of the display space to
       the center of the polymarker.
    xop = operator response
    OPQA/LOCATION OF 2D POLYMARKER: Enter the distance, in
       centimeters, from the top edge of the display space to
       the center of the polymarker.
    yop = operator response

    if (xop,yop app= xloc,yloc (in cm.)) then
       OK so far
    else
       fail
       goto end_loc
    endif
next ix
pass

end_loc:

TEST: #SR 1 2
      "All polymarkers drawn within the display space should be
       visible, and all others should not be visible."

set marker type to asterisk
set polymarker color to 2 for enhanced visibility
ran4 = ensure each side has a different number of markers
     = set of 4 random numbers between 3 and 8

for ix = left,right,bottom,top
   ran12 = randomize 12 locations along each edge
   nmark = number of markers to be drawn = ran4(ix)
   for jx = 1 to 12
      if (jx <= nmark) then
         draw marker just inside edge #ix at ran12(jx)
      else
         draw marker just outside edge #ix at ran12(jx)
      endif
   next jx
next side

OPQA/SIZE OF DISPLAY SPACE: Enter four numbers indicating how many
  markers are visible along the left, right, bottom, and top edges
  respectively of the entire display space.
pass/fail depending on
  (operator returns the four correct nmark values for each side)

END PROGRAM 1