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