Remix.run Logo
panzerboiler 3 days ago

A Bézier curve is not an interpolating spline. It is a parametric curve defined by a set of control points, which the curve typically does not pass through (except the first and last points). Bézier curves exhibit local control (changing a control point influences only a portion of the curve, especially in piecewise Bézier constructions). Interpolating splines may seem more user-friendly at first, since the curve passes exactly through all the given points. However, this can lead to unintuitive behavior: modifying a single point can cause global changes in the curve, including in areas far from the edited point. In some cases, these changes can be drastic, making precise control difficult or impossible. I may be biased by my 20+ years of graphic design work, but I prefer the precision and control given by Bézier curves.

ttoinou 3 days ago | parent [-]

The person you're answering to is not suggesting interpolating curves. Piecewise quadratic bezier curves are very local, two quadratic bezier curves can approximate well a 3rd degree bezier curve

panzerboiler 3 days ago | parent [-]

I probably misunderstood their message. By the way, two quadratic curves can approximate well a tiny subset of what a cubic bezier can represent. The number of quadratics required in the general case can grow quite substantially, very quickly.

ttoinou 3 days ago | parent [-]

You're right we probably need at least 3 quadratic bezier curves to cover most uses cases of 3rd degree bezier curves. (In general, not all shapes of 3rd degree bezier curves are used in the wild, that would lead to too much deformation and impossible paths).

But I agree with the OP, artists might only need new tools that use quadratic bezier curves in a different ways

neutronicus 2 days ago | parent [-]

To your point:

I work on a commercial CAD application (architecture space) and we have a Polyline Tool (misnomer) that lets users add quadratic Bezier curves and arc segments and they are not clamoring for anything more than that. There is the ability to specify the quadratic segments by point on curve at t=1/2, and various different ways of specifying arc segments. But this is all just UI, under the hood it's arc segments, line segments, and quadratic Bezier and it seems to meet their needs.

There is also a NURBS curve tool but my impression is that the vast majority of our users just stick with the 2D Polyline.

ttoinou 2 days ago | parent [-]

Interesting. Arc segments are arc circles ?

neutronicus 2 days ago | parent [-]

Yep, subsets of circles.

Users can specify them by three points on the perimeter, by tangents at endpoints (up to 180deg of course), with various other conveniences (you can place two tangent arc or bezier vertices in a row and create an implicit g1 interface between the two arc / bezier segments).

Constraint solvers are good at circles and you can offset them analytically so they make a lot of sense for CAD.

I can't really say this rigorously but I also think that Bezier segments and circle segments are good "partners" for approximating smooth curves - each has just enough degrees of freedom for you to require g1 continuity between them, one of them always has constant non-zero curvature, the other cannot have constant non-zero curvature, and the locality aspect matches the intuition of a human operator.

ttoinou 9 hours ago | parent [-]

Thanks ! I don't think Offsets are straightforward (closed form equation) with Bezier but it can be approximated