RegularPolygon - Maple Help

geometry

 RegularPolygon
 define a regular polygon

 Calling Sequence RegularPolygon(p, n, cen, rad)

Parameters

 p - the name of the regular polygon n - positive integer >= 3 cen - point which is the center of the n-gon rad - number which is the radius of the circumscribed circle of the n-gon

Description

 • A p-gon is regular if it is both equilateral and equiangular.
 • A regular polygon is easily seen to have a center, from which all the vertices are at the same distance R0, while all the sides are at the same distance R1. This means that there are two concentric circles, the circum-circle and the in-circle, which pass through the vertices and touch the sides, respectively.
 • To access the information relating to a regular polygon p, use the following function calls:

 form(p) returns the form of the geometric object (i.e., RegularPolygon2d if p is a regular polygon). DefinedAs(p) returns a list of vertices of p. sides(p) returns the side of p. center(p) returns the center of p. radius(p) returns the radius of the circum-circle of p. inradius(p) returns the radius of the in-circle of p. InteriorAngle(p) returns the interior angle of p. ExteriorAngle(p) returns the exterior angle of p. apothem(p) returns the apothem of p. perimeter(p) returns the perimeter of p. area(p) returns the area of p. detail(p) returns a detailed description of the given regular polygon p.

 • The command with(geometry,RegularPolygon) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{geometry}\right):$
 > $\mathrm{RegularPolygon}\left(\mathrm{gon},5,\mathrm{point}\left(o,1,1\right),2\right)$
 ${\mathrm{gon}}$ (1)
 > $\mathrm{detail}\left(\mathrm{gon}\right)$
 $\begin{array}{ll}{\text{name of the object}}& {\mathrm{gon}}\\ {\text{form of the object}}& {\mathrm{RegularPolygon2d}}\\ {\text{the side of the polygon}}& {4}{}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}}{{5}}\right)\\ {\text{the center of the polygon}}& \left[{1}{,}{1}\right]\\ {\text{the radius of the circum-circle}}& {2}\\ {\text{the radius of the in-circle}}& {2}{}{\mathrm{cos}}{}\left(\frac{{\mathrm{\pi }}}{{5}}\right)\\ {\text{the interior angle}}& \frac{{3}{}{\mathrm{\pi }}}{{5}}\\ {\text{the exterior angle}}& \frac{{2}{}{\mathrm{\pi }}}{{5}}\\ {\text{the perimeter}}& {20}{}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}}{{5}}\right)\\ {\text{the area}}& {20}{}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}}{{5}}\right){}{\mathrm{cos}}{}\left(\frac{{\mathrm{\pi }}}{{5}}\right)\\ {\text{the vertices of the polygon}}& \left[\left[{3}{,}{1}\right]{,}\left[{1}{+}{2}{}{\mathrm{cos}}{}\left(\frac{{2}{}{\mathrm{\pi }}}{{5}}\right){,}{1}{+}{2}{}{\mathrm{sin}}{}\left(\frac{{2}{}{\mathrm{\pi }}}{{5}}\right)\right]{,}\left[{1}{-}{2}{}{\mathrm{cos}}{}\left(\frac{{\mathrm{\pi }}}{{5}}\right){,}{1}{+}{2}{}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}}{{5}}\right)\right]{,}\left[{1}{-}{2}{}{\mathrm{cos}}{}\left(\frac{{\mathrm{\pi }}}{{5}}\right){,}{1}{-}{2}{}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}}{{5}}\right)\right]{,}\left[{1}{+}{2}{}{\mathrm{cos}}{}\left(\frac{{2}{}{\mathrm{\pi }}}{{5}}\right){,}{1}{-}{2}{}{\mathrm{sin}}{}\left(\frac{{2}{}{\mathrm{\pi }}}{{5}}\right)\right]\right]\end{array}$ (2)