• Parameters

    • graph: FOLD

      a FOLD object

    • Optional epsilon: number = EPSILON

      an optional epsilon

    Returns {
        changes: {
            edges: {
                map: number[][];
            };
            vertices: {
                map: number[][];
            };
        };
        result: FOLD;
    }

    a planar graph only containing vertex and edge data, along with an object describing changes to the graph.

    • changes: {
          edges: {
              map: number[][];
          };
          vertices: {
              map: number[][];
          };
      }
      • edges: {
            map: number[][];
        }
        • map: number[][]
      • vertices: {
            map: number[][];
        }
        • map: number[][]
    • result: FOLD

    Description

    Planarize a graph into the 2D XY plane forming a valid planar graph. This will neatly resolve any overlapping collinear edges, resolve all crossing edges, but do nothing with face information.