Brain Dump

Bezier Curves

Tags
computer-graphics

An interpolation algorithm for defining a parametric-curve.

[see page 10, Uses] 4 points 2 keyframes and 2 control points to specify how the curve should vary over time. It defines the curve as a function of these 4 points with a Bernstein Blending Function transformation applied to each of them to produce a smooth curve.

Properties:

  • The number of control points for a bezier curve is [see page 16, always] one larger than the degree of the curve.
  • The curve is always contained within the convex-hull of its control points (because of the BBF).
  • Transforming the curve and then moving the control points is the same as transforming control points and then redrawing the curve.

You can even [see page 17, join] multiple bezier curve segments.

Continuity

Describes how two joined parametric curves continue into or from one another.

If the two curves share a control point then we get what's called perfect-continuity ($C0$/\(G0\)). That is one curve naturally follows onto the next.

Derivative (\(C_1\)) continuity describes a smooth transition from one curve to the next, that is to say a control points of the two curves is shared AND the tangents between them at the join are identical. This gives us a smooth transition.

[see page 18, Tangent] continuity (\(G_1\)) is the same as derivative continuity except the tangents between the two curves are proportional to one another (not equal).

Rendering

  • Substitute increasing values of \(u\) and join (but how finely should you sample?)
  • [see page 20, subdivide] each curve into two curves which're continuous across the join.
    • Keep subdividing until the current path reaches a linearity criterion (dividing it any more will only produce a flat line).