next up previous contents index
Next: PROJECTION Up: GREG2 Language Internal Help Previous: PLOT RGB   Contents   Index


POLYGON

        [GREG2\]POLYGON [(File)Name] [/PLOT]  [/VARIABLE]  [/FILL  [Colour]]
    [/HATCH [Ipen] [Angle] [Separ] [Phase]]

    If  no argument and no option, it calls the interactive cursor to define
    the polygon summits. Type any key to go to next summit, C to correct the
    last  one, D to delete it, and type E to end the polygon definition. The
    last polygon side will then appear. The polygon definition may be abort-
    ed  by  typing  Q. For graphical displays, you may use the mouse buttons
    for the commands. The left mouse button draws a vertex, the middle mouse
    button  deletes  the  last  vertex,  and the right mouse button ends the
    polygon definition. After the use of the cursor,  the  polygon  plot  is
    stored in the GTV metacode in a segment named POLYGON. You can delete it
    with the command CLEAR SEGMENT.

    If a (File)Name is given as argument, the cursor is not called. The sum-
    mit coordinates are read from:
      - the  named ASCII file (X in column 1, Y in column 2) if no option is
        present,
      - the named SIC variable, if /VARIABLE is present. It can be an  array
        of the form:
               VAR[NXY,2]  Real or Double
        or a structure of the form (i.e. same as output):
               VAR%NXY         Integer or Long
               VAR%X[VAR%NXY]  Real or Double
               VAR%Y[VAR%NXY]  Real or Double

    Whereever they come from (cursor, file, or variable), the polygon values
    are  stored  internally;  they  can  be   printed   with   the   command
    GREG2\WRITE POLYGON, and they correspond to the variables POLY%NXY (num-
    ber of vertices), POLY%X and POLY%Y (the corresponding coordinates). The
    currently defined POLYGON is used by the commands MEAN and MASK.

    The  polygon loaded by the command can directly be plotted with the fol-
    lowing options:
      /FILL [Colour]: the polygon  is  color-filled  with  the  current  pen
          colour  or with the specified colour (see HELP PEN /COL for possi-
          bilities),
      /HATCH [Ipen] [Angle] [Separ] [Phase]: the polygon is filled with par-
          allel  hatch  lines with the specified pen (default current), with
          the given angle in degrees (default 45),  separation  in  physical
          units  (default  0.25  cm),  and phase from 0 to 1 to displace the
          lines by this fraction of the separation from  a  fixed  reference
          (default 0).
      /PLOT: the polygon contours are drawn with the current pen,
    For  a color-filled and/or hatched and/or contoured polygon, these three
    options can be combined; they will be executed in the above order.


Gildas manager 2020-09-28