• Parameters

    • graph: FOLD

      a FOLD object, modified in place.

    • points: [number, number][] | [number, number, number][] = []

      array of points to be added to the graph

    Returns number[]

    index of vertex in new vertices_coords array. the size of this array matches array size of source vertices. duplicate (non-added) vertices returns their pre-existing counterpart's index.

    Description

    Add vertices to the graph by setting their coordinates. This method will maintain that all other arrays in the graph are valid, any "vertices_" arrays that exist in the graph will be filled with empty arrays. The new vertices will be initialized as isolated.