Skip to content

Documentation / @ripl/terminal / estimateEllipseSteps

Function: estimateEllipseSteps() ​

estimateEllipseSteps(rx, ry, sweep): number

Defined in: terminal/src/algorithms.ts:398

Estimates a reasonable number of line segments for an ellipse of the given raster-space radii.

Parameters ​

ParameterTypeDescription
rxnumberRadius along the ellipse's own x axis, in raster pixels.
rynumberRadius along the ellipse's own y axis, in raster pixels.
sweepnumberThe angle the ellipse sweeps through, in radians.

Returns ​

number

The number of segments to sample the ellipse with.