fn kummer_elliptic_perimeter(radii: Vec2) -> f64
Expand description
Calculates circumference C of an ellipse with radii (x, y) as the infinite series
C = pi (x+y) * ∑ binom(1/2, n)^2 * h^n from n = 0 to inf with h = (x - y)^2 / (x + y)^2 and binom(.,.) the binomial coefficient
as described by Kummer (“Über die Hypergeometrische Reihe”, 1837) and rediscovered by Linderholm and Segal (“An Overlooked Series for the Elliptic Perimeter”, 1995).
The series converges very quickly for ellipses with only moderate eccentricity (h
not close
to 1).
The series is truncated to the sixth power, meaning a lower bound on the true value is
returned. Adding the value of kummer_elliptic_perimeter_range
to the value returned by this
function calculates an upper bound on the true value.