polygon

This command draws a polygon in the geometry.

Inline mode usage

polygon -h
Displays the help file that summarizes the parameters for this command.
polygon –n <name> -p <x1> <y1> <z1> <x2> <y2> <x3> <y3> ...
Draws a N-gon with the specified vertices.
polygon –n <name> -r -p <sides> <x y z> <radius>
Draws a regular polygon with <sides> number of sides.
polygon –n <name> -s -p <sides> <x y z> <radius_1> <radius_2>
Draws a regular star with <sides> number of sides.

Interactive mode usage

Vertices method:

Invocation
polygon
Parameters
  • The coordinates of each vertex of the polygon, in “x y z” format. When the desired points have been entered, the user needs to press Enter (without specifying any coordinates) to draw the polygon. A minimum of three vertices are required.

Regular polygon method:

Invocation
polygon -r
Parameters
  • The number of sides of the polygon.
  • The center point of the polygon.
  • The radius of the circle that the polygon is circumscribed in.

Star method:

Invocation
polygon -s
Parameters:
  • Number of spikes of the star.
  • Center point of the star.
  • Minor radius of the star.
  • Major radius of the star.

Example

> polygon
Point 0 [x y z] 1 1 0
Point 1 [x y] 1 3
Point 2 [x y] 3 3
Point 3 [x y] 4 1
Point 4 [x y]:
> 

Result



Figure 1. Resulting polygon