You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current sampling method for generating an ellipse in turf is to simply take samples at regular angle intervals (essentially identical to the @turf/circle implementation). This results in ugly and stretched ellipses where the difference between the length of the semi-major axes is appreciable. I propose that it should use arc-length intervals instead, as this results in a more natural representation of the ellipse.
Here is a gist of a drop-in replacement of @turf/ellipse that does arc-length interval sampling. You are also able to specify an accuracy value to tune performance vs. accuracy.
Here's a jsfiddle with a side-by-side comparison of the two methods, highlighting the weaknesses of the current implementation (left: current, right: new hotness). http://jsfiddle.net/hkejm20t/88/
The text was updated successfully, but these errors were encountered:
The current sampling method for generating an ellipse in turf is to simply take samples at regular angle intervals (essentially identical to the
@turf/circle
implementation). This results in ugly and stretched ellipses where the difference between the length of the semi-major axes is appreciable. I propose that it should use arc-length intervals instead, as this results in a more natural representation of the ellipse.Here is a gist of a drop-in replacement of
@turf/ellipse
that does arc-length interval sampling. You are also able to specify anaccuracy
value to tune performance vs. accuracy.https://gist.github.com/cmbasnett/b62ea614e7b05f713b03835b3e93d4d3
Here's a jsfiddle with a side-by-side comparison of the two methods, highlighting the weaknesses of the current implementation (left: current, right: new hotness). http://jsfiddle.net/hkejm20t/88/
The text was updated successfully, but these errors were encountered: