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


        [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 X11 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 Name is given as argument, the cursor is not called but the summit
    coordinates are read from the corresponding file (X is in column 1, Y in
    column 2), or corresponding SIC Variable if the option /VARIABLE is also

    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 vertexes), 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  [Icol]:  the  polygon  is color-filled with the specified color
          (default current),
      /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 2014-07-01