In computer graphics, the terms parametric continuity (Ck) and geometric continuity (Gn) were introduced by Brian Barsky, to show that the smoothness of a curve can be measured either with respect to a particular parametrization or after allowing changes in the speed with which the parameter traces out the curve.

Parametric continuity

Parametric continuity (Ck) is a concept applied to parametric curves, which describes the smoothness of the curve as a function of its parameter. A (parametric) curve s : [ 0 , 1 ] → R n {\displaystyle s:[0,1]\to \mathbb {R} ^{n}} is said to be of class Ck if the derivatives of s {\displaystyle s} up to order k {\displaystyle k} exist and are continuous on [ 0 , 1 ] {\displaystyle [0,1]}, where derivatives at the end-points 0 {\displaystyle 0} and 1 {\displaystyle 1} are taken to be one-sided derivatives (from the right at 0 {\displaystyle 0} and from the left at 1 {\displaystyle 1}).

As a practical application of this concept, a curve describing the motion of an object with a parameter of time has C1 continuity when its velocity varies continuously, and C2 continuity when its acceleration varies continuously. For smoother motion, such as that of a camera's path while making a film, higher orders of parametric continuity may be required.

Order of parametric continuity

Two Bézier curve segments attached in a way that is only C0 continuous
Two Bézier curve segments attached in such a way that they are C1 continuous

The various orders of parametric continuity can be described as follows:

  • C 0 {\displaystyle C^{0}}: zeroth derivative is continuous (curves are continuous)
  • C 1 {\displaystyle C^{1}}: zeroth and first derivatives are continuous
  • C 2 {\displaystyle C^{2}}: zeroth, first and second derivatives are continuous
  • C n {\displaystyle C^{n}}: 0-th through n {\displaystyle n}-th derivatives are continuous

Geometric continuity

Curves with G1-contact (circles,line)
( 1 − ε 2 ) x 2 − 2 p x + y 2 = 0 , p > 0 , ε ≥ 0 {\displaystyle (1-\varepsilon ^{2})x^{2}-2px+y^{2}=0,\ p>0\ ,\varepsilon \geq 0} pencil of conic sections with G2-contact: p fix, ε {\displaystyle \varepsilon } variable (ε = 0 {\displaystyle \varepsilon =0}: circle,ε = 0.8 {\displaystyle \varepsilon =0.8}: ellipse, ε = 1 {\displaystyle \varepsilon =1}: parabola, ε = 1.2 {\displaystyle \varepsilon =1.2}: hyperbola)

A curve or surface can be described as having G n {\displaystyle G^{n}} continuity, with n {\displaystyle n} being an increasing measure of smoothness. Consider the segments on either side of a point on a curve:

  • G 0 {\displaystyle G^{0}}: The curves touch at the join point.
  • G 1 {\displaystyle G^{1}}: The curves also share a common tangent direction at the join point.
  • G 2 {\displaystyle G^{2}}: The curves also share a common center of curvature at the join point.

In general, G n {\displaystyle G^{n}} continuity holds when the curves can be reparameterized so that they have C n {\displaystyle C^{n}} parametric continuity. A reparametrization of the curve is geometrically identical to the original; only the parameter is affected.

Equivalently, two vector functions f ( t ) {\displaystyle f(t)} and g ( t ) {\displaystyle g(t)} such that f ( 1 ) = g ( 0 ) {\displaystyle f(1)=g(0)} have G n {\displaystyle G^{n}} continuity at the point where they meet if they satisfy equations known as Beta-constraints. For example, the Beta-constraints for G 4 {\displaystyle G^{4}} continuity are:

g ( 1 ) ( 0 ) = β 1 f ( 1 ) ( 1 ) g ( 2 ) ( 0 ) = β 1 2 f ( 2 ) ( 1 ) + β 2 f ( 1 ) ( 1 ) g ( 3 ) ( 0 ) = β 1 3 f ( 3 ) ( 1 ) + 3 β 1 β 2 f ( 2 ) ( 1 ) + β 3 f ( 1 ) ( 1 ) g ( 4 ) ( 0 ) = β 1 4 f ( 4 ) ( 1 ) + 6 β 1 2 β 2 f ( 3 ) ( 1 ) + ( 4 β 1 β 3 + 3 β 2 2 ) f ( 2 ) ( 1 ) + β 4 f ( 1 ) ( 1 ) {\displaystyle {\begin{aligned}g^{(1)}(0)&=\beta _{1}f^{(1)}(1)\\g^{(2)}(0)&=\beta _{1}^{2}f^{(2)}(1)+\beta _{2}f^{(1)}(1)\\g^{(3)}(0)&=\beta _{1}^{3}f^{(3)}(1)+3\beta _{1}\beta _{2}f^{(2)}(1)+\beta _{3}f^{(1)}(1)\\g^{(4)}(0)&=\beta _{1}^{4}f^{(4)}(1)+6\beta _{1}^{2}\beta _{2}f^{(3)}(1)+(4\beta _{1}\beta _{3}+3\beta _{2}^{2})f^{(2)}(1)+\beta _{4}f^{(1)}(1)\\\end{aligned}}}

where β 2 {\displaystyle \beta _{2}}, β 3 {\displaystyle \beta _{3}}, and β 4 {\displaystyle \beta _{4}} are arbitrary, but β 1 {\displaystyle \beta _{1}} is constrained to be positive. In the case n = 1 {\displaystyle n=1}, this reduces to f ′ ( 1 ) ≠ 0 {\displaystyle f'(1)\neq 0} and f ′ ( 1 ) = k g ′ ( 0 ) {\displaystyle f'(1)=kg'(0)}, for a scalar k > 0 {\displaystyle k>0} (i.e., the direction, but not necessarily the magnitude, of the two vectors is equal).

While it may be obvious that a curve would require G 1 {\displaystyle G^{1}} continuity to appear smooth, for good aesthetics, such as those aspired to in architecture and sports car design, higher levels of geometric continuity are required. For example, class A surface requires G 2 {\displaystyle G^{2}} or higher continuity to ensure smooth reflections in a car body.

A rounded rectangle (with ninety-degree circular arcs at the four corners) has G 1 {\displaystyle G^{1}} continuity, but does not have G 2 {\displaystyle G^{2}} continuity. The same is true for a rounded cube, with octants of a sphere at its corners and quarter-cylinders along its edges. If an editable curve with G 2 {\displaystyle G^{2}} continuity is required, then cubic splines are typically chosen; these curves are frequently used in industrial design.