RegularPolygon
ABSTRACT
Produces a rectangular polygon mesh. Note that you do not really have a lot of control on the initial angle offset, so you may want to play around with composing a regular polygon with a Rotated operator.
PARAMETERS
center | a 3-vector representing the center of the polygon |
n | an integer representing the amount of vertices to include in the regular polygon |
circumradius | the circumradius of the polygon (that is, the radius from any of the vertices to the center) |
center | a 3-vector representing the center of the polygon |
n | an integer representing the amount of vertices to include in the regular polygon |
circumradius | the circumradius of the polygon (that is, the radius from any of the vertices to the center) |
normal | a 3-vector representing the normal of the mesh, defaults to {0,0,1} . Note that the direction of the minor and major axes are only guaranteed to be normal to the normal, but the exact direction is somewhat unspecified. This behavior is ugly and may be changed in the future. |
tag | a vector of numbers that is used as the mesh's tag |
default | an enum branch specifying to use the default coloring scheme, which is a white stroke with no fill |
stroke | a 4-vector representing the color of the stroke |
stroke | a 4-vector representing the color of the stroke |
fill | a 4-vector representing the color of the fill. Note that providing this value will force an uprank |
RETURN
a mesh that contains a rectangular polygon according to the specifications
DECLARATION
func RegularPolygon([config] {[main] {center, n, circumradius}, [parameterized] {center, n, circumradius, normal}}, tag, [color] {[default] {}, [stroke] {stroke}, [solid] {stroke, fill}})