coords.Coords.circulize#
- Coords.circulize(n)#
Transform sectors of a regular polygon into circular sectors.
Parameters#
- n: int
Number of edges of the regular polygon.
Returns#
- Coords
A Coords where the points inside each sector of a n-sided regular polygon around the origin are repositioned to fill a circular sector. The polygon is in the x-y-plane and has a vertex on the x-axis.
Notes#
Points on the x-axis and on radii at i * 360 / n degrees are not moved. Points on the bisector lines between these radii are moved maximally outward. Points on a regular polygon will become points on a circle if circulized with parameter n equal to the number of sides of the polygon.
Examples#
>>> Coords([[1.,0.],[0.5,0.5],[0.,1.]]).circulize(4) Coords([[ 1. , 0. , 0. ], [ 0.7071, 0.7071, 0. ], [-0. , 1. , 0. ]])