       trace -> "flip [#{T.triangulation__.toSeq().join ', '}], #{a}, #{b}"
       c = T.third a, b
       d = T.third b, a
-      children = seq [tri(b, c, d), tri(a, d, c)]
+      S = T.triangulation__.minus(a,b,c).minus(b,a,d).plus(b,c,d).plus(a,d,c)
+      children = seq [S.triangle(c, d), S.triangle(d, c)]
       new T.constructor(
-        T.triangulation__.minus(a,b,c).minus(b,a,d).plus(b,c,d).plus(a,d,c),
-        T.sites__,
-        T.children__.plus([tri(a,b,c), children], [tri(b,a,d), children])
+        S, T.sites__,
+        T.children__.plus([T.triangle(a,b), children],
+                          [T.triangle(b,a), children])
       )
 
     # The private function `doFlips` takes a triangulation and a stack of

    subdivide = (T, t, p) ->
      trace -> "subdivide [#{T.triangulation__.toSeq().join ', '}], #{t}, #{p}"
      [a, b, c] = t.vertices()
      new T.constructor(
        T.triangulation__.minus(a,b,c).plus(a,b,p).plus(b,c,p).plus(c,a,p),
        T.sites__.plus(p),
        T.children__.plus([tri(a,b,c), seq [tri(a,b,p), tri(b,c,p), tri(c,a,p)]])
      )

    # The private function `flip` creates a new triangulation from `T` with the

      else if seq.find([[a, b], [b, c], [c, a]], ([p, q]) => @third p, q)
        throw new Error "Orientation mismatch."
      else
        t = new Triangle a, b, c
        added = [[[a, b], [t, c]], [[b, c], [t, a]], [[c, a], [t, b]]]
        new Triangulation @third__.plusAll added

