Turfjs / Turfjs/turf

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

Open
#2,897 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
10.5k
Forks
1k
Avg merge
1h 11m
Merged PRs (30d)
4

Description

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!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the turf.circle(...) entry point and the linked Observable post on smarter circle approximations. The issue does not name a source file or test, so first clarify which construction should be adopted and how accuracy will be evaluated. Done would require an agreed approximation, an implementation, and validation of the resulting polygons.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.