seedhammer-v1-companion/bezier/doc.go
mineracks d62384658d Lift bezier/ + bspline/ from Gangleri42 fork
First batch of code lifts: hardware-agnostic curve math packages.

- bezier/: cubic + quadratic Bezier curve representation +
  tessellation. Lifted verbatim from Gangleri42/seedhammer
  @ 0a3c63ef path bezier/. Stdlib only.

- bspline/: B-spline curves + an LP-based optimiser that finds the
  smallest engrave-stroke representation of a path. Lifted from
  Gangleri42/seedhammer @ 0a3c63ef path bspline/. Depends on
  bezier/ + gonum (BSD-3, brought in transitively).

Import paths rewritten from `seedhammer.com/X` to
`github.com/mineracks/seedhammer-v1-companion/X`. No other changes.

go build ./... and go test ./bezier/... ./bspline/... both clean.

Doc.go stubs updated to reflect LIFTED status with the source
commit pinned.

Deferred to next commit:
- backup/ (needs bc/fountain + bc/ur transitively for UR codes)
- font/{comfortaa,poppins,constant}/ (needs font/bitmap runtime)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 18:29:29 +10:00

12 lines
535 B
Go

// Package bezier provides quadratic and cubic Bezier curve representations
// plus tessellation helpers for the engrave pipeline.
//
// Used to convert OpenType glyph QuadTo/CubeTo segments and SH1E SVG path
// Q/C commands into linear MoveTo/LineTo sequences at the engraver's
// resolution.
//
// LIFTED from https://github.com/Gangleri42/seedhammer/tree/seedhammer-features/bezier
// at commit 0a3c63efb125d17d8ec86ce739ecd058c8747cfe. Hardware-agnostic
// math; identical to upstream apart from the Go import path.
package bezier