README

A 2D path simplification library.

Expand ▾ Collapse ▴

Documentation

Overview

    Package path simplifies paths of 2-dimensional points.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func OfFloatPoints

    func OfFloatPoints(pt func(i int) (x, y float64), len int) path

      OfFloatPoints creates an abstract path of float64 2d points.

      The path has a length len and float64 2d coordinates for each point at index i with 0 <= i < len.

      func OfIntPoints

      func OfIntPoints(pt func(i int) (x, y int), len int) path

        OfIntPoints creates an abstract path of integer 2d points.

        The path has a length len and integer 2d coordinates for each point at index i with 0 <= i < len.

        func Simplify

        func Simplify(path path, epsilon float64) []int

          Simplify finds representative points in the given path and returns their indices. The path is given through the abstract path interface, which is constructed with one of the helpers in the same package.

          Types

          This section is empty.