Previous: plotfilefilename-fortranunitnumbermask-nomaskxminxmaxyminymax Up: ../slides.html Next: polyline


POLYGON

 POLYGON (COLOR-INDEX
            number|(Black|Blue|Cyan|Green|Magenta|Red|White|Yellow))|
         (EDGE-STYLE number|(Interior|Solid))|
         (FILL-INDEX number)|
         (INTERIOR-STYLE number|(Patterned|Plain|Shaded))|
         LAST
 or
 POLYGON <ABSOLUTE|RELATIVE>
 ...three or more x y z point coordinates...
 ENDPOLYGON

 In the first  form of  the polygon command,  the keywords  COLOR-INDEX,
 EDGE-STYLE, FILL-INDEX, and INTERIOR-STYLE specify a polygon  attribute
 to be used for all subsequent  polygons.  The keyword is followed by  a
 single integer value of the attribute, or by one of the indicated  name
 keywords.  The most useful option is the fill index, for which a  value
 0 gives  no filling,  values 1..84  give progressively  darker  filling
 patterns, and larger values select user-definable patterns.

 The keyword LAST requests  that the last  absolute or relative  polygon
 entered be  replotted.   It  is obviously  most  useful  with  relative
 polygons, since pairs of MOVE and POLYGON LAST commands can be used  to
 obtain multiple instances of the same polygon shape.

 In the  second form,  the keywords  ABSOLUTE and  RELATIVE specify  the
 polygon type, with  ABSOLUTE assumed if  neither keyword is  specified.
 The  following  lines  then  specify  the  polygon  vertex  coordinates
 (x,y,z), one point per line, with the list terminated by the ENDPOLYGON
 command.  The last vertex is implicitly  connected to the first, and  a
 move is automatically made to the first point.

 The polygon  vertex coordinates  are saved  internally in  a buffer  of
 fixed size (currently  256 entries);  if more  vertices are  specified,
 excess ones except  the last are  discarded, and a  warning message  is
 issued.  The truncated  polygon will  still be  plotted, however.   The
 POLYGON LAST command can later  be issued (possibly after changing  one
 or more  polygon attributes)  to plot  the same  polygon again  without
 having to reenter its coordinates.

 Any coordinate scale factors in effect at the time a polygon is plotted
 are temporarily  applied to  the coordinate  values, but  the  original
 coordinates are restored after the  polygon is actually plotted.   This
 can be  useful  with  the  POLYGON  LAST  command  to  obtain  multiple
 instances of a polygon with varying scale.