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


POLYGON

        [GREG2\]POLYGON [(File)Name] [/PLOT] [/VARIABLE] [/FILL [Colour]]

    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
    present.

    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.

    If you specify the option /PLOT, the polygon currently  loaded  will  be
    plotted.  The  option /FILL [Colour] will fill the current polygon, with
    the current or specified colour.


Gildas manager 2011-04-01