question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

svgLib: support approximating arcs to cubic bezier curves

See original GitHub issue

Follow up from @santhoshtr attempt here: https://github.com/fonttools/fonttools/pull/1136

Let’s continue the discussion here.

I found this piece of python code that @behdad wrote, an Arc class with an approximate_bezier metohd: https://github.com/behdad/gl-bezier/blob/master/behdad.py#L114

He said cairo has a similar but better implementation. Need to check that out

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rsheetercommented, Jan 17, 2019

Good news, people are very determined to ensure I do nothing but attend meetings so I guess I can dodge that bullet 😃

0reactions
behdadcommented, Jan 17, 2019

Oh very nice. I was reading Pomax but cairo-arc.c is even better.

I see you’re getting pulled into the curve math blackhole 😄. There’s a lot to read, and even more unwritten…

Read more comments on GitHub >

github_iconTop Results From Across the Web

bezierTools: Routines for working with Bezier curves - fontTools
Approximates the arc length for a cubic Bezier segment. Uses Gauss-Lobatto quadrature with n=5 points to approximate arc length. See calcCubicArcLength() ...
Read more >
SVG: Convert Arcs to Cubic Bezier - Stack Overflow
With that said, cubic Bezier curves work quite well for quarter-circle arcs, so if you have arcs smaller than that, you can use...
Read more >
On the approximation of Bezier curves by circular arcs
The article assumes that you understand basic algebra and geometry, complex numbers, etc… Bezier curves. Cubic bezier curve. I assume that you ...
Read more >
Approximating Arcs Using Cubic Bezier Curves - Eden Cridge
Bézier curves can be used to approximate elliptical arcs in systems where there is no native arc support; this is useful in many...
Read more >
APPROXIMATION OF A CUBIC BEZIER CURVE BY ...
cubic Bezier curve by a set of circular arcs are discussed. These questions occur in CAD/CAM systems during data exchange from data formats...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found