-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
atParam differs significantly from expected value #335
Comments
Right, this is because we approximate circles by four cubic bezier segments, one for each quadrant. https://github.com/diagrams/diagrams-lib/blob/master/src/Diagrams/TwoD/Arc.hs#L57 We could use a more accurate approximation, with the downside that render times would increase, as well as the output size for any vector graphics format. Many years ago, @fryguybob and I discussed at great length the possibility of including circular arcs as a new primitive kind of segment, alongside straight and cubic bezier segments. That would allow |
I don't think this is causing me any problems in practice at the moment, and if needed it's possible to work around by using circle' n r = cubicSpline True $ map p (init [0,2**(-n)..1])
where p a = p2 (r*cos (a*tau), r*sin (a*tau)) |
@bacchanalia Note that your |
The difference between
atParam
oncircle 1
vs trig functions can be high enough to be easily seen on reasonably sized renders.The text was updated successfully, but these errors were encountered: