path

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 0 Imported by: 1

README

A 2D path simplification library.

Documentation

Overview

Package path simplifies paths of 2-dimensional points.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OfFloatPoints added in v0.1.2

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 added in v0.1.2

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL