Polygon

ABSTRACT

Produces a polygon mesh. Not so important that you have to memorize, but it does come up somewhat often.

PARAMETERS
verticesa vector of 3-vectors representing the counter clockwise order of the vertices.
verticesa vector of 3-vectors representing the counter clockwise order of the vertices.
normal_hinta 3-vector representing the normal hint of the mesh, defaults to {0,0,1}. Useful if the polygon is non planar, and you want to provide a hint when the regular normal calculation algorithm is failing.
taga vector of numbers that is used as the mesh's tag
defaultan enum branch specifying to use the default coloring scheme, which is a white stroke with no fill
strokea 4-vector representing the color of the stroke
strokea 4-vector representing the color of the stroke
filla 4-vector representing the color of the fill. Note that providing this value will force an uprank
RETURN

a mesh that contains a polygon according to the specifications

DECLARATION
func Polygon([config] {[main] {vertices}, [normal_hint] {vertices, normal_hint}}, tag, [color] {[default] {}, [stroke] {stroke}, [solid] {stroke, fill}})