The hermite form is sometimes called a cubic spline.
Given : Points P1, P4 Tangent vectors R1, R4
Look at x component: x(t) = axt^3 + bxt^2 + cxt + dx
So want to solve for ax, bx, cx, dx using the four continuity
conditions, i.e. for two curve segments there is C0 and C1
continuity.
So we have: x(0) = P1x, x(1) = P4x , x'(0) = R1x, x'(1) = R4x
Now we can rewrite x(t) as:
x(t) = [t3 t2 t 1] |ax| |bx| |cx| |dx| = TCx Now the 4 conditons can be expressed as:
for t = 0 x(0) = P1x = [ 0 0 0 1 ] Cx for t = 1 x(1) = P4x = [ 1 1 1 1 ] Cx
For the tangent expressions we differentiate the expression for x (with respect to t) x'(t) = [ 3t2 2t 1 0] Cx x'(0) = R1x = [ 0 0 1 0] Cx x'(1) = R4x = [ 3 2 1 0] Cx
We can gather the 4 conditions into one matrix equation: |P1| |0 0 0 1| |P4| = |1 1 1 1| Cx |R1| |0 0 1 0| |R4| |3 2 1 0| We solve for Cx by inverting the matrix and get:
(with MH = Hermite Matrix GH = Hermite Geometry vector) é -2 2 1 1 ù éP1ù Cx = ê -3 3 -2 -1ú êP4 ê = MH GHx ê 0 0 1 0 ú êR1ú ë 1 0 0 0 û ëR4û ß ß MH GHx \ x (t) = TMH GHx ü y (t) = TMH GHy ý By Symmetry z (t) = TMH GHz þ or P (t) = TMH GH If we multiply out terms, then for x(t) we get: TMH = [(2t3 - 3t2 +1) (-2t3 + 3t2) (t3 - 2t2 + t) (t3 - t2)] Then post multiply by GHx and get x(t) = TMHGHx = P1x (2t3 - 3t2 + 1) + P4x (-2t3 + 3t2) + R1x (t3 - 2t2 + t) + R4X (t3 - t2) with similar expressions for y, z The 4 functions of t are sometimes called "blending functions". Note : the first 2 functions blend P1, P4 and the second 2 blend R1, R4. So procedure: 1.Enter number of points to be computed between "Data Points." 2.Compute table of blending functions. 3.Enter / Compute "Data Points" and tangent vectors then use above equations for each curve segment. Example: - enter P1, R1 P2,R2 P3,R3 Hermite method is good for fitting existing surface but not for interactively creating one since it is difficult to enter R's and know what curves will look like.
A program illustrating Hermite Splines.
Splines main page
HyperGraph
Table of Contents.
HyperGraph Home
page.