Skip to content

Add arc_to_cubic_beziers for Arcs. - #419

Merged
nical merged 2 commits into
nical:masterfrom
kleintom:cubic_arc_approximation
Oct 5, 2018
Merged

nical merged 2 commits into
nical:masterfrom
kleintom:cubic_arc_approximation

Conversation

@kleintom

@kleintom kleintom commented Oct 5, 2018

Copy link
Copy Markdown
Contributor

Note that I increased the step for cubic beziers to pi/2 from the pi/4 used in the quadratic case - I'm new to this so I'm not sure if that's appropriate or not (it's based on a comment at https://pomax.github.io/bezierinfo/#circles_cubic).

I'm attaching plots of the four test Arcs from arc.rs with their cubic approximations, plus a fifth with a larger sweep_angle
graphs.pdf

@nical

nical commented Oct 5, 2018

Copy link
Copy Markdown
Owner

Splendid!

Note that I increased the step for cubic beziers to pi/2 from the pi/4 used in the quadratic case

Yes that's appropriate, cubic béziers are able to fairly closely approximate a quarter of an ellipse.
At a glance the code looks good, I'll give it a closer look before tomorrow.

Thanks a lot!

@nical
nical merged commit b8c4520 into nical:master Oct 5, 2018
@nical nical mentioned this pull request Oct 5, 2018
@kleintom
kleintom deleted the cubic_arc_approximation branch October 5, 2018 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants