turf icon indicating copy to clipboard operation
turf copied to clipboard

@turf/ellipse Construction

Open lemmingapex opened this issue 7 months ago • 0 comments

turf version: 7.2.0

turf.ellipse(...) should produce the same result as turf.circle(...) when the xSemiAxis equals the ySemiAxis and these equal the circle radius:

turf.ellipse([-122.3104, 47.6627], 10.0, 10.0, { steps : 12 });

Image

notice the varying side lengths of the construction that results from the ellipse call vs the circle call (circle shown in red below).

turf.circle([-122.3104, 47.6627], 10.0, { steps : 12 });

Image

The initial angle of construction also differs (case with 6 sides below):

Image

Further more, the construction of an ellipse whose xSemiAxis and ySemiAxis are almost equal, should also produce a result that's ver close to the result of truf.circle(...). i.g. turf.ellipse([-122.3104, 47.6627], 10.0, 9.999, { steps : 12 });.

lemmingapex avatar Jun 16 '25 16:06 lemmingapex