(* 
      variables for a single edge error function (Subscript[E, f]) *) 
(Subscript[v, a]) = {(Subscript[v, a, x]), 
          (Subscript[v, a, y])};

    (Subscript[v, b]) = {(Subscript[v, b, x]), (Subscript[v, b, y])};

    (Subscript[v, c]) = {(Subscript[v, c, x]), (Subscript[v, c, y])};

    (Subscript[u, a]) = {(Subscript[u, a, x]), (Subscript[u, a, y])};     (* 
      (Subscript[u, i]) are the deformed positions from the previous step *) 

    (Subscript[u, b]) = {(Subscript[u, b, x]), 
          (Subscript[u, b, y])};

 (* 
      This is the error function for a single edge (Subscript[E, f])  (eqn 12 in Igarashi05) *) 


    EeAB  =  ( ((Subscript[v, b]) - (Subscript[v, a]))  -  ((Subscript[u, b])  -  
                  (Subscript[u, a])) ) .  ( ((Subscript[v, b]) - (Subscript[v, a]))  -  ((Subscript[u, b])  -  
                  (Subscript[u, a])) );

\(\(\(
\)\(
\)\(
\)\( (*\ Coefficients\ for\ the\ terms\ of\ matrix\ H\  - \ 
        each\ row\ is\ \(v\_\(\([abc]\)[xy]\)\) 
          v\_\(\([abc]\)[xy]\)\ *) \)\(
\)\(
\)\(Print["X Coeffs:"]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(a, x\)]], \ {v\_\(a, x\), v\_\(b, x\), 
        v\_\(c, x\)}\ ]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(b, x\)]], \ {v\_\(a, x\), v\_\(b, x\), 
        v\_\(c, x\)}\ ]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(c, x\)]], \ {v\_\(a, x\), v\_\(b, x\), 
        v\_\(c, x\)}\ ]

    Print["Y Coeffs:"]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(a, y\)]], \ {v\_\(a, y\), \ v\_\(b, y\), 
        v\_\(c, y\)}\ ]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(b, y\)]], \ {v\_\(a, y\), \ v\_\(b, y\), 
        v\_\(c, y\)}\ ]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(c, y\)]], \ {v\_\(a, y\), \ v\_\(b, y\), 
        v\_\(c, y\)}\ ]

 (*\ 
      Coefficients\ for\ the\ terms\ of\ F\ \((terms\ that\ use\ previous - 
            step\ deformed\ coords)\)\ *) 


    Print["DeformedX Coeffs:"]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(a, x\)]], \ {u\_\(a, x\), 
        u\_\(b, x\)}\ ]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(b, x\)]], \ {u\_\(a, x\), 
        u\_\(b, x\)}\ ]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(c, x\)]], \ {u\_\(a, x\), 
        u\_\(b, x\)}\ ]

    Print["DeformedY Coeffs:"]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(a, y\)]], \ {u\_\(a, y\), 
        u\_\(b, y\)}\ ]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(b, y\)]], \ {u\_\(a, y\), 
        u\_\(b, y\)}\ ]

    Coefficient[
      FullSimplify[D[EeAB, \ v\_\(c, y\)]], \ {u\_\(a, y\), 
        u\_\(b, y\)}\ ]

    \)\)\)