corner): Isobands A similar algorithm can be created for filled contour bands within upper and lower threshold values: Contouring triangle meshes The same basic algorithm can be applied to triangular meshes, which consist of connected triangles with data assigned to the vertices. For example, a scattered set of data points could be connected with a Delaunay triangulation to allow the data field to be contoured. A triangular cell is always planar, because it is a 2-simplex (i.e. specified by n+1 vertices in an n-dimensional space). There is always a unique linear interpolant across a triangle, and no possibility of an ambiguous saddle. Isolines The analysis for isolines over triangles is especially simple: there are 3 binary digits, so there are 8 possibilities: Isobands The analysis for isobands over triangles requires 3 ternary trits, so there are 27 possibilities: Dimensions and spaces The data space for the Marching Squares algorithm is 2D, because the vertices assigned a data value are connected to their neighbors in a 2D topological grid, but the spatial coordinates assigned to the vertices can be in 2D, 3D or higher dimensions. For example, a triangular mesh may represent a 2D data surface embedded in 3D space, where spatial positions of the vertices and interpolated points along a contour will all have 3 coordinates. Note that the case of squares is ambiguous again, because a quadrilateral embedded in 3-dimensional space is not necessarily planar, so there is a choice of geometrical interpolation scheme to draw the banded surfaces in 3D. Performance considerations The algorithm is embarrassingly parallel, because all cells are processed independently. It is easy to write a parallel algorithm assuming: Shared read-only input scalar field. Shared append-only geometry output stream. A naive implementation of Marching Squares that processes every cell independently will perform every linear interpolation twice (isoline) or four times (isoband). Similarly, the output will contain 2 copies of the 2D vertices for disjoint lines (isoline) or 4 copies for polygons (isobands). [Under the assumptions that: the grid is large, so that most cells are internal; and a full contiguous set of isobands is being created.] It is possible to reduce the computational overhead by caching the results of interpolation. For example, a single-threaded serial version would only need to cache interpolated results for one row of the input grid. It is also possible to reduce the size of the output by using indexed geometric