Tutorial Solutions
Parametric Cubic Curves

  1. A curve of the desired type will look something like the following:

    The general form is given by:
    x(t) = T A_x
    y(t) = T A_y
    z(t) = T A_z
    
    where
    T = [ t^3 t^2 t 1 ]
    A = [ a3 ]
        [ a2 ] 
        [ a1 ]
        [ a0 ]
    
    We know the following four constraints hold for x (and analogous constraints hold for y and z):
    t=0:   P0_x = [ 0     0   0  1 ] A_x
    t=1/3: P1_x = [ 1/27 1/9 1/3 1 ] A_x
    t=2/3: P2_x = [ 8/27 4/9 2/9 1 ] A_x
    t=1:   P3_x = [ 1     1   1  1 ] A_x
    
    Writing this in terms of a vector equation gives:
    G_x = B A_x
    
    Solving for A_x gives:
    A_x = B_inv G_x
    
    Thus,
    x(t) = T A_x
    x(t) = T B_inv G_x
    x(t) = T M G_x
      ( M = B_inv )
    
    where
            [ -9  27 -27  9 ]
    M = 0.5 [ 18 -45  36 -9 ]
            [-11  18  -9  2 ]
            [  2   0   0  0 ]
    
    The basis functions are given by T M:
      f1(t) = -4.5t^3 + 9t^2 - 5.5t + 1
      f2(t) = -13.5t^3 - 22.5t^2 + 9t
      f3(t) = -13.5t^3 + 18t^2 - 4.5 t
      f4(t) = 4.5t^3 - 4.5t^2 + t
    
    These look as follows:


  2. A(0) = (0,0)
    A(1) = (1,1)
    B(0) = (1,1)
    B(1) = (3,6)
    
    A(1) = B(0), therefore we have atleast C0 (and G0) continuity.
    A'(1) = (1,2t) evaluated for t=1, giving (1,2)
    B'(0) = (2,3t^2 + 4) evaluated for t=0, givine (2,4)
    
    We see that we do not have C1 continuity.
    dy/dx for A(1) = 2/1 = 2
    dy/dx for B(0) = 4/2 = 2
    
    We therefore have G1 continuity.