
polygon   -   creates   the   graphical   primitive   of   type

DOM_POLYGON

Calling sequence:

polygon(point_1 [ , point_2, ... ] [ , option ... ])
option  --->  identifier = value

Parameter:

point_i   --  graphical primitive created by point

Summary:

polygon is used to create a two- or threedimensional polygon, which can be
displayed graphically.

These polygons are built of points, created by use of the function point . In
case of a twodimensional polygon only twodimensional points are permitted
and in case of a threedimensional polygon only threedimensional points are
permitted. The following options are available for the definition of a polygon:

_Option/Value__________Meaning_________________________________Default_value____

Color                 Colour of the polygon                   colour   of   the
                                                              object

     [r, g, b]         The real values between 0.0 and 1.0 are
                       used to describe the amount of red, green
                       and blue of the desired colour.

 Closed                                                        FALSE
     TRUE              The polygon will be closed.  This option
                       is currently only available for polygons
                       consisting of three points, i.e. triangles.
     FALSE             The polygon is not closed.

 Filled                                                        FALSE
     TRUE              The polygon will be filled. Again it is to
                       be noticed, that currently only polygons
                       consisting of three points can be filled.
     FALSE             The polygon will not be filled.

Triangles, which are both closed and filled, will be displayed filled. In addition
the edges of that triangles will be rendered in the actual foreground colour.

>>  a := point(0.0, 0.0):
    b := point(1.0, 1.0):

    c := polygon(a,b);

      polygon(point(0.0, 0.0), point(1.0, 1.0))

>>  a := point(0.0, 0.0, 0.0):
    b := point(1.0, 1.0, 1.0):
    c := point(1.0, 1.0, 0.0):

    d := polygon(a, b, c, Closed = TRUE):
    e := polygon(a, b, c, Filled = TRUE):
    f := polygon(a, b, c, Closed = TRUE, Filled = TRUE):

See also:  plot2d , plot3d , point

