Difference between revisions of "Polygon Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|geometry}}
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|geometry}}
; Polygon[ <Point>, ..., <Point> ]
+
; Polygon( <Point>, ..., <Point> )
 
: Returns a polygon defined by the given points.
 
: Returns a polygon defined by the given points.
:{{example|1=<div><code><nowiki>Polygon[(1, 1), (3, 0), (3, 2), (0, 4)]</nowiki></code> yields a quadrilateral.</div>}}
+
:{{example|1=<code><nowiki>Polygon((1, 1), (3, 0), (3, 2), (0, 4))</nowiki></code> yields a quadrilateral.}}
; Polygon[ <Point>, <Point>, <Number of Vertices> ]
+
; Polygon( <Point>, <Point>, <Number of Vertices> )
 
: Creates a regular polygon with ''n'' vertices.
 
: Creates a regular polygon with ''n'' vertices.
:{{example|1=<div><code><nowiki>Polygon[(1, 1), (4, 1), 6]</nowiki></code> yields a hexagon.</div>}}
+
:{{example|1=<code><nowiki>Polygon((1, 1), (4, 1), 6)</nowiki></code> yields a hexagon.}}
; Polygon[ &lt;List of Points> ]
+
; Polygon( <List of Points> )
 
: Returns a polygon defined by the points in the list.  
 
: Returns a polygon defined by the points in the list.  
:{{example|1=<div><code><nowiki>Polygon[{(0, 0), (2, 1), (1, 3)}]</nowiki></code> yields a triangle.</div>}}
+
:{{example|1=<code><nowiki>Polygon({(0, 0), (2, 1), (1, 3)})</nowiki></code> yields a triangle.}}
;Polygon[ <Point>, <Point>, <Number of Vertices>, <Direction> ]
+
;Polygon( <Point>, <Point>, <Number of Vertices n>, <Direction> )
:Creates a regular polygon with n vertices, and directed by the direction (e.g. a plane to which the polygon will be parallel, if possible).
+
:Creates a regular polygon with ''n'' vertices, and directed by the ''direction'' (e.g. a plane to which the polygon will be parallel, if possible).
  
 
{{Note| See also [[File:Mode polygon.svg|link=|24px]] [[Polygon Tool|Polygon]] and [[File:Mode regularpolygon.svg|link=|24px]] [[Regular Polygon Tool|Regular Polygon]] tools.}}
 
{{Note| See also [[File:Mode polygon.svg|link=|24px]] [[Polygon Tool|Polygon]] and [[File:Mode regularpolygon.svg|link=|24px]] [[Regular Polygon Tool|Regular Polygon]] tools.}}

Latest revision as of 10:33, 11 October 2017


Polygon( <Point>, ..., <Point> )
Returns a polygon defined by the given points.
Example: Polygon((1, 1), (3, 0), (3, 2), (0, 4)) yields a quadrilateral.
Polygon( <Point>, <Point>, <Number of Vertices> )
Creates a regular polygon with n vertices.
Example: Polygon((1, 1), (4, 1), 6) yields a hexagon.
Polygon( <List of Points> )
Returns a polygon defined by the points in the list.
Example: Polygon({(0, 0), (2, 1), (1, 3)}) yields a triangle.
Polygon( <Point>, <Point>, <Number of Vertices n>, <Direction> )
Creates a regular polygon with n vertices, and directed by the direction (e.g. a plane to which the polygon will be parallel, if possible).
Note: See also Mode polygon.svg Polygon and Mode regularpolygon.svg Regular Polygon tools.
© 2021 International GeoGebra Institute