33 include <../datatypes/datatypes-base.scad>;
88 b = (cw ==
true) ? [360:-(360/n):1] : [0:(360/n):359]
91 let( v = [s*cos(a), s*sin(a)] )
113 ) =
is_defined(r) ? pow(r, 2) * n * sin(360/n) / 2
function rpolygon_lp(n, r, a, vr, cw=true)
Compute the coordinates for an n-sided regular polygon.
function not_defined(v)
Test if a value is not defined.
function rpolygon_perimeter(n, r, a)
Compute the perimeter of an n-sided regular polygon.
function unit_l(l)
Compute the normalized unit vector of a Euclidean line (or vector).
function is_defined(v)
Test if a value is defined.
function rpolygon_area(n, r, a)
Compute the area of an n-sided regular polygon.