Documentation ¶
Index ¶
- Constants
- func Distance(p1, p2 Point) float64
- type Line
- type Lines
- func (l *Lines) Add(line Line)
- func (l Lines) Animate(fname string) (err error)
- func (l Lines) BestOrdering() (l2 Lines)
- func (l Lines) BoundingBox(x, y, w, h float64) (l2 Lines)
- func (l Lines) Consolidate(joinFraction float64) (l2 Lines)
- func (l Lines) Copy() (l2 Lines)
- func (l Lines) Draw(fname string) (err error)
- func (l Lines) DrawStep(step int, im0 ...image.Image) (im image.Image)
- func (l Lines) Normalize() (l2 Lines)
- func (l Lines) RemoveSmall(fraction float64) (l2 Lines)
- func (l Lines) Simplify(percent float64) (l2 Lines)
- func (l Lines) ToGcode() (gcode string)
- type Point
Constants ¶
View Source
const MillimetersPerPixel = 0.26458333
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Lines ¶
func (Lines) BestOrdering ¶
func (Lines) BoundingBox ¶
func (Lines) Consolidate ¶
func (Lines) Normalize ¶
Normalize keeps aspect ratio but makes sure all coordinates are between 0 and 1
func (Lines) RemoveSmall ¶
func (Lines) Simplify ¶
Simplify points by some percentage using the https://en.wikipedia.org/wiki/Visvalingam%E2%80%93Whyatt_algorithm
Click to show internal directories.
Click to hide internal directories.