turf icon indicating copy to clipboard operation
turf copied to clipboard

Consider Using a Different Approximation for turf.circle(...)

Open lemmingapex opened this issue 7 months ago • 3 comments

turf.circle(...) uses an inscribed polygon to estimate a circle. I am wondering if you have considered different constructions of this polygon. A construction of a regular polygon that has equal area to the circle it's approximating will give better results in many cases. The following post contains many more detail you may consider: https://observablehq.com/@lemmingapex/smarter-approximations-for-circles

Please let me know what you think about this and if you have any questions. Thanks!

lemmingapex avatar Jun 06 '25 18:06 lemmingapex

Sounds like a great idea @lemmingapex. Are you interested in submitting a PR?

smallsaucepan avatar Jun 10 '25 09:06 smallsaucepan

I would be happy to submit a pull request for this work @smallsaucepan. Thanks for your help.

lemmingapex avatar Jun 10 '25 17:06 lemmingapex

Please let me know what else you need in order to merge this PR. Thanks!

lemmingapex avatar Jul 01 '25 22:07 lemmingapex