Design: 04.02.05.03/P11

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 11: Edge bundle index

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

DEFINED EDGE INDICES: All edges but one are identical (drawn with
the same attributes).  Identify the edge that is different.

UNDEFINED EDGE INDICES: A star is drawn with several triangles
beneath it.  Normally, all of these will have the same edge
attributes as the star.  Count up and report the number of
triangles which match the star in edgetype, edgewidth, and color.

DESIGN:

set all ASFs to BUNDLED
set interior style attribute ASFs to INDIVIDUAL
   set interior style = EMPTY, interior color index = 1

<inquire workstation state table lengths> to determine maximum
   number of entries in edge table
szbt   = maximum size of bundle table

<inquire edge facilities> to determine:
numet = number of available edgetypes
laet  = list of available edgetypes

sort laet

*** *** ***   edge index   *** *** ***

use interior style EMPTY

TEST: #SR 3 4 5 6
      "A defined edge index should cause the addressed
       entry in the bundle table to be used when rendering a
       edge."

bundis = number of bundles to be displayed = min(8, szbt)
initialize all of bundis to: edgeflag ON
                             edgetype 1,
                             edgewidth scale factor 1.0,
                             color index 1

altet  = alternative edgetype
switch = switch edge flag
if (numet > 1) then
   altet  = laet(2)
   switch = ON
else
   altet  = laet(1)
   switch = OFF
endif

bundif = randomly selected bundle from bundis
set bundif = edge flag = switch
             edgetype  = altet
             edgewidth scale factor  = 2.0
             color     = 2

Display and label triangles with edges for each bundle in bundis

OPQA/DEFINED EDGE INDICES: which triangle is different?
pass/fail depending on (edge with attributes from bundle #bundif
                        selected)

TEST: #SR 3 4 5 7
      "An undefined edge index should cause bundle number 1
       in the edge bundle table to be used when rendering an
       edge."

set index #1 in bundle table to edge flag = ON
                                edgetype   = altet
                                edgewidth  = 2.0
                                edge color = 2

u1,u2,u3 = 3 undefined, positive indices - all greater than
  maximum defined index in bundle table (szbt)
explct = number of explicit edges using bundle #1 = random integer
   from 0 to 4

draw star with bundle index 1

display interleaved:
  three triangles with edges using bundle index u1,u2,u3,
  explct triangles with edges using bundle index 1

OPQA/UNDEFINED EDGE INDICES: How many of the triangles
  have the same edge attributes as the star?
pass/fail depending on response = 3+explct

END PROGRAM 11