Joining Curves Smoothly: C⁰, C¹, G¹ and C²
Long paths are chains of short Bézier pieces, and the seams decide how motion along them feels. Matching positions () leaves no gap, matching velocities () leaves no jolt, matching only the direction () looks smooth but lets the speed jump, and matching accelerations too () keeps the curvature, and a car's steering wheel, from snapping.
What the symbols mean
- End of the first piece
The last control point of the curve before the seam.
- Start of the next piece
The first control point of the curve after the seam.
What the symbols mean
- Incoming handle
The arrow from the last handle of the first piece to the seam. Its 3 times is the velocity arriving.
- Outgoing handle
The arrow from the seam to the first handle of the next piece. Its 3 times is the velocity leaving.
What the symbols mean
- Length ratio
How much longer the outgoing handle is. The speed jumps by this factor at the seam; k = 1 is C¹.
What the symbols mean
- Bend at the end
A sixth of the acceleration B″(1) arriving at the seam. The left side is a sixth of the acceleration leaving.
What the symbols mean
- Curvature
How sharply the path bends: 1 divided by the radius of the circle that fits the path best at that point. 0 on a straight line.
- Velocity × acceleration
The 2D cross product of the velocity and the acceleration: only the sideways part of the acceleration counts.
Explanation
Continuity is about what happens at the seam where one curve ends and the next begins: is there a gap, a corner, a sudden change of speed, or nothing you could feel at all? The labels count how much matches at the seam. means the positions match (no gap). means the velocities match too (no corner and no change of speed). means the accelerations match as well. , with G for geometric, means only the direction of travel matches, so the path looks smooth but the speed can jump. Each of these turns out to be a simple rule about where to put the handles on either side of the seam, so don't let the letters put you off.
Why chain curves at all? One cubic only has four control points to work with: enough for an arch, an S or a small loop, but not for a whole letter, a race track or a ten-second camera move. Those are paths made of many cubic pieces laid end to end. Call the piece before the seam and the piece after it , each with its own from to , and for now assume both pieces take the same amount of time.
: no gap. The next piece starts where the last one ended: . Anything less and whatever is moving teleports.
: mirrored handles. From Bernstein Polynomials and Tangents, the velocity arriving at the end of the first piece is and the velocity leaving the start of the next is . Set them equal and the 's cancel: . Since , that's . Picture it: the two handles at the seam lie on one straight line through the anchor point, equally long, mirror images of each other. That's what a vector editor's "symmetric" point does for you.
: aligned handles. Now let the outgoing handle point the same way but have a different length: with . The direction of travel is the same on both sides, so you can't see a corner. But the velocity is multiplied by at the seam, so the speed jumps. On a printed letter that's harmless (nothing travels along it), and type designers use seams all the time. In motion it isn't: a camera on a path lurches forward or brakes at the seam. There's an animation further down with the two kinds side by side.
One honest exception. If the first piece takes seconds and the second , the real velocities are and , and the handoff is smooth in real time when . So handle lengths should be in proportion to how long each piece lasts. That's the same "hand off with matching velocity" rule as in Chaining and Interrupting Motion.
: matching acceleration. From the last lesson, and . Set them equal and solve for the one new point: . Substitute the and rules, and :
Notice how little freedom is left. Once the first piece is drawn, decides , and , and only is yours. That's why long paths are usually built as B-splines, a different way of placing control points that comes out automatically.
Curvature in words. The curvature (kappa) at a point is how sharply the path bends there. Find the circle that hugs the path best at that point; if its radius is , then . A straight road has , and a roundabout of radius m has per meter. The formula at the top computes it from velocity and acceleration, and the top line is the 2D cross product (see The Cross Product), which keeps only the part of the acceleration that pushes sideways. At the start of a Bézier piece, put and into it. The part is , and , so
Curvature uses second derivatives, so a seam can still have a jump in curvature. A seam (moving at nonzero speed) can't.
Why a car jerks its steering. The steering wheel sets the curvature a car drives: hold the wheel still and the car drives a circle. So to follow a road, the wheel has to track as it changes. Now take a road made of a straight stretch joined to a circular arc of radius . It's , with no corner and nothing that forces the speed to change, but jumps from to at the seam. The driver would have to spin the wheel instantly, and the passengers' sideways acceleration, , jumps from to in no time. That's a seam that is (even ) but not . Highway and railway builders put a transition curve (a clothoid, whose curvature grows steadily with distance) between straights and arcs for exactly this reason, and camera rigs and robot paths aim for for the same one.
A common mistake. It's tempting to think a seam you can't see is a seam you can't feel. It isn't so: aligned handles of different lengths () hide a sudden change of speed, and mirrored handles () between a straight piece and a bend hide a sudden jump in curvature. Your eye forgives both. A camera, a car or a robot arm doesn't.
See it
Worked examples
A path starts with a straight piece , , , . The next piece starts at and has and . Choose to make the seam , then decide whether it is and find the curvature just before and just after the seam.
- 1
The seam is already : the second piece starts at .
A path's first piece ends with and . The next piece starts at with . Is the seam , or neither? What happens to the speed there, and where should go for ?
- 1
Find the incoming handle: .
Practice
Type your answer and check it. Solve them all to complete the lesson.
A path's first cubic piece ends with and . The next piece starts at . Where must its first handle go for a seam? Enter the point as .
A path's first cubic piece ends with and , and the next piece starts at . A designer wants a seam with the outgoing handle exactly units long. Where does go? Enter the point as .
At a seam, the first piece's last handle is , the seam is , and the next piece's first handle is . What kind of seam is it?
A path's first cubic piece has , and . The next piece starts at with chosen for a seam. Where must go to make the seam ? Enter the point as .
A cubic Bézier starts with control points , and . What is the radius of the circle that fits the curve best at its start (the radius of curvature, )?
A road runs straight and then joins a circular arc of radius m with no corner, so the seam is . A car takes it at a steady m/s. By how much does the car's sideways acceleration jump at the seam, in m/s²?
An animator chains two cubic Bézier pieces for a camera move. The first piece takes s and ends with and (in meters); the second starts at and takes s. Where must go so that the camera's velocity in m/s doesn't jump at the seam? Enter the point as .
The hardest one here. Get it, and you've got this lesson.
A race-game track starts with the cubic piece , , , . The designer wants the next piece to join with a seam so the cars' steering never snaps. Find , and the curvature at the seam. Enter 's , then 's , then .
Where it's used
Vector editors give every anchor point a type: a corner (only ), a smooth point with aligned handles () or a symmetric point with mirrored handles (). Type designers mostly need , since letters don't move. Motion is stricter: animation software keeps camera and character paths so nothing lurches, roads and railways use transition curves so curvature (and the steering wheel, and the passengers' sideways push) changes gradually, and robot and CNC tool paths are planned so the motors never see an instant change in acceleration.