Kochanek–Bartels spline explained

In mathematics, a Kochanek–Bartels spline or Kochanek–Bartels curve is a cubic Hermite spline with tension, bias, and continuity parameters defined to change the behavior of the tangents.

Given n + 1 knots,

p0, ..., pn,

to be interpolated with n cubic Hermite curve segments, for each curve we have a starting point pi and an ending point pi+1 with starting tangent di and ending tangent di+1 defined by

di=

(1-t)(1+b)(1+c)
2

(pi-pi-1)+

(1-t)(1-b)(1-c)
2

(pi+1-pi)

di+1=

(1-t)(1+b)(1-c)
2

(pi+1-pi)+

(1-t)(1-b)(1+c)
2

(pi+2-pi+1)

where...

tensionChanges the length of the tangent vector
biasPrimarily changes the direction of the tangent vector
continuity Changes the sharpness in change between tangents
Setting each parameter to zero would give a Catmull–Rom spline.

The source code found here of Steve Noskowicz in 1996 actually describes the impact that each of these values has on the drawn curve:

TensionT = +1→ TightT = -1→ Round
BiasB = +1→ Post ShootB = -1→ Pre shoot
ContinuityC = +1→ Inverted cornersC = -1→ Box corners
The code includes matrix summary needed to generate these splines in a BASIC dialect.

External links