So it turns out that you can't totally model circles with Bézier curves:

How to create circle with Bézier curves?

I'm wondering if there is a mathematical system or construction that unifies circles, straight lines, and Bézier curves into a single formalism. I get that you could just say that formalism is "equations", but I'm wondering if there is anything in between each of these specific categories, and the general category of equations, for modeling these 3 different kinds of pretty general geometric constructions.

In SVG you can model ellipses or parts of ellipses with the a or A command:

M 0 50 L 10 50 A 30 20, 0, 0 0, 90 50 L 100 50

While for Bézier curves you use the c or C command.

M100,250 C100,100 400,100 400,250

Likewise, for lines you use other commands.

Basically I'm wondering, independent of SVG, if there is any unified system for this.

  • $\begingroup$ If I am right, the NURBS can model all of these. $\endgroup$ – Yves Daoust Jan 10 at 18:49
  • $\begingroup$ @YvesDaoust: You are indeed right: non-uniform rational B-splines are that generalization. SVG paths actually support cubic (third degree curves), quadratic (second degree curves), and circular or elliptic arcs. These suffice for visuals (we know from decades of experience with PostScript), and NURBS support would have just made the format unnecessarily complex. Most computer aided design (CAD) software do support NURBS curves and patches. $\endgroup$ – Nominal Animal Jan 10 at 20:42

Lines, circular arcs, and Bézier curves can all be represented exactly as rational Bézier curves. These are a generalization of the polynomial Bézier curves that many people know and love.

Rational Bézier curves can also represent pieces of other types of conic curves (parabolas, ellipses, hyperbolas), in addition to circular arcs.

A NURBS curve is just a sequence of rational Bézier curves strung together end-to-end so that (usually) they join smoothly.

  • $\begingroup$ But it sounds like, APIs that support "quadratic" or "cubic" Bezier curves do not support rational Bezier curves, because they require weights. But if you set the weights to 1 then you essentially have no weights anymore and now we are back to polynomial Bezier curves like the quadratic and cubic ones. Hopefully that is correct. Thank you. $\endgroup$ – Lance Pollard Jan 14 at 2:11
  • $\begingroup$ Most drawing/graphics APIs that I'm aware of do not support rational curves. CAD standards like IGES and STEP do, though. And you are correct that setting all weights to $1$ (or to any fixed constant) causes cancellation and your rational curve becomes a plain ordinary polynomial one. $\endgroup$ – bubba Jan 14 at 6:03
  • $\begingroup$ For the vast majority of applications, rational curves are not worth the trouble, in my opinion. You can construct very good approximations using polynomial curves, and these are easier to understand, easier to implement, and much easier to exchange between different software systems. $\endgroup$ – bubba Jan 14 at 6:05

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.