{<entity> = } polygon { <pcommand> ... }
Create a polygon graphic entity.
<entity>
An entity or gstucture
identifier.The polygon entity will be given this name.
<pcommand>
A command line
containing either:
a language command to be executed normally, which may or may not generate polygon vertices, or
a series of point expressions separated by commas defining polygon vertices.
-alph=<num>
An alpha transparency factor between 0 and 1. A value 1 implies fully opaque,
0 means fully transparent (therefore invisible). The default is 1.
-br=<num>
A brightness factor between -1 and +1. A value 0 means normal, -1 means
very dark (black), +1 means very bright (white). The default is 1.
-col=<color>
The color of the
polygon edges. If included, this will override any colors defined in the
line style (-ls) and the fill style (-fil).
If omitted, the value no_change is used.
-draw
Display the entity graphics during creation. The default behavior is
to suppress display until completion of the command, unless the command
was typed from the keyboard.
-ff
Fix the fill color so that it is unaffected by subsequent modifications
to the entity color.
-fil=<fillstyle>
The fill characteristics color of the polygon interior. If omitted, the
polygon is not filled. Note: <fillstyle> can be a fillstyle, color, tile, hatchstyle or graduation.
-fr=<num>
Define a fragment number for the entity. If omitted the default fragment is used.
-g=<groups>
The graphic groups
of which the entity is to be a member.
-h
Define this polygon as an "outer hole" polygon. It is useful to
define an outer polygon as a hole when it is used merely as a container
for other top-level polygons which require to be linked. Such outer hole
polygons are often given a null linestyle to suppress the drawing of their
edges.
-ls=<linestyle | color>
The line style of the polygon edge. This can be a line style or a color.
If omitted, the current modeling color def_color
is used.
-par=<entity>
The parent entity of the polygon. This is only necessary when the polygon is to be a hole
within another polygon.
-pc
Compute the para-centroid of the polygon and make it the polygon’s origin.
-ra=<num>
Define a rank for the entity. If omitted, the default rank is used.
-th=<num>
The thickness of the polygon edges.
If Included this will override any thickness defined in
the line style (-ls) or hatch style (-fil).
This command always creates a graphic entity. Duplicate consecutive vertices are ignored.
The symbology of polygon egdes may be changed by using relevant assignments within the command block, e.g. def_color=blue.
During edge definition, a vector phrase beginning with a @ will indicate a n invisible edge. A phrase beginning with $ indicates a line styled edge, using line style def_ls. If neither prefix is present, the line style given by the -ls switch will be used. Warnings are given if polygon edges cross or when slivers are detected.
Create an unnamed triangular polygon entity.
polygon {gc, e:1000, w:500&n:500, r}
Create an unnamed polygon entity, whose edges are defined interactively.
polygon -col=red, -fil=green, -pc { pseries; # Command r; # Point phrase "return to start" }
Create a named polygon entity in a command block. The polygon is a regular polygon of 2000 edges.
angle_mode = "radians" numeric nedges = 2000, radius = 1000 numeric ang = 0, delta = 2*pi/nedges entity bigp = polygon -fil=red { for i=1,nedges { #Command (radius*cos(ang), radius*sin(ang), 0); # Point phrase ang = ang + delta; # Command } }
Add a circular hole to the previous polygon.
polygon -par=bigp { circle -c=p0, -r=250 }
Commands: |
|
Identifiers: |
angle_mode (string), def_color (color), def_fragment (numeric), def_ls (linestyle), def_rank (numeric) |