Documentation / @ripl/terminal / flattenArc
Function: flattenArc() ​
flattenArc(
cx,cy,radius,startAngle,endAngle,counterclockwise,steps?):Vertex[]
Defined in: terminal/src/algorithms.ts:346
Samples an arc from startAngle to endAngle into a polyline of points (inclusive of both endpoints).
Pass steps when the sampled points are about to be transformed into a different space: the default count is derived from radius, so sampling in one space and rasterizing in a larger one would under-segment the curve.
Parameters ​
| Parameter | Type |
|---|---|
cx | number |
cy | number |
radius | number |
startAngle | number |
endAngle | number |
counterclockwise | boolean |
steps? | number |
Returns ​
Vertex[]