regularPolygon Cellzilla2D Home

Description

Generates the vertices of a regular or non-regular polygon.

Needs["Cellzilla2D`"];

Return Value

regularPolygon[n] returns the vertices of a regular n-gon inscribed in the unit circle, with one vertex at (0,1).

regularPolygon[n, θ] returns the vertices of a regular n-gon inscribed in the unit circle, with one vertex at (Cos[θ],Sin[θ]).

regularPolygon[n, θ, a] returns the vertices of a regular n-gon inscribed in the unit circle with starting vertex at θ but stretched (or squeezed) in the y-direction by a factor of a.

regularPolygon[n, θ, a, rnd] returns the vertices of a regular n-gon inscribed in the unit circle with starting vertex at θ but stretched (or squeezed) in the y-direction by a factor of a, and with a random number between -rnd and rnd added to each vertex.

regularPolygon[n, θ, a, rnd, φ] returns the vertices of a regular n-gon inscribed in the unit circle with starting vertex at θ but stretched (or squeezed) in the y-direction by a factor of a; each vertex is randomized (or -1 means don't randomize); then the whole thing is rotated by an angle of φ about the origin.

Options

Example

[ Download Example as Zipped Mathematica Notebook ]

Implementation Notes

See Also

RegularStar



[ 13.june.2017 ]