leaves us with a number that is a multiple of $\pi/2$, from which we compute the index.

After we determine singular triangles, we approximate the location of the singularity within the triangle by taking the barycenter of the triangle. We choose an arbitrary node, $n$, on the triangle and rotate the cross component vectors at that node into the plane of the face. We use the ray starting at the barycenter and passing through $n$ as a reference axis, and compute the angle $\alpha$ that the nearest cross component vector makes with the reference axis. We then compute the angles where streamlines exit the singularity (ports) as $\alpha + \frac{2\pi k}{4-d}$ where $d/4$ is the index of the singularity (see [@viertel_approach_2019]).

Separatrix Tracing {#sec:separatrices}
------------------

After designing a cross field on $T$, we build an initial quad partition by tracing separatrices of the cross field. Below, we describe the methods used for tracing separatrices in non-singular and singular triangles.

### Non-Singular Triangles {#sec:non-singular-triangles}

In non-singular triangles $t_{ijk}$, we project the crosses on each corner of $t_{ijk}$ into the plane of the triangle. We define a reference coordinate axis in that plane, and compute a representation vector for each cross with 