Documentation ¶
Index ¶
- type Bezier
- func (b Bezier) BezierIntersections(l line.Line) []float64
- func (b Bezier) Blossom(fs ...float64) d2.Pt
- func (b Bezier) BlossomBuf(ptBuf []d2.Pt, fs ...float64) d2.Pt
- func (b Bezier) Cache() BezierCache
- func (Bezier) L(t, c int) d2.Limit
- func (b Bezier) LineIntersections(l line.Line, buf []float64) []float64
- func (b Bezier) Pt1(t float64) d2.Pt
- func (b Bezier) Segment(start, end float64) Bezier
- func (b Bezier) SegmentBuf(start, end float64, ptBuf []d2.Pt, floatBuf []float64) Bezier
- func (b Bezier) Tangent() Tangent
- func (b Bezier) V1(t float64) d2.V
- func (b Bezier) V1c0() d2.V1
- func (Bezier) VL(t, c int) d2.Limit
- type BezierCache
- type Tangent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bezier ¶
Bezier curve defined by a slice of control points
func (Bezier) BezierIntersections ¶
BezierIntersections returns the intersection points relative to the Bezier curve.
func (Bezier) BlossomBuf ¶
BlossomBuf computes the Blossom point for the control points of a bezier curve using the provided buffer. Reusing a buffer can increase performance.
func (Bezier) Cache ¶
func (b Bezier) Cache() BezierCache
Cache pre-computes the Tangent and returns a BezierCache
func (Bezier) LineIntersections ¶
LineIntersections fulfills line.LineIntersector returning the intersection points relative to the line.
func (Bezier) Segment ¶
Segment returns a bezier curve that whose start and end is relative to the base curve. So calling b.(0.2, 0.7) will return a curve that exactly matches b from 0.2 to 0.7.
func (Bezier) SegmentBuf ¶
SegmentBuf returns a bezier curve that whose start and end is relative to the base curve. Providing a buf reduces the overhead.
type BezierCache ¶
BezierCache holds both a Bezier curve and it's Tangent and is more efficient if both Pts and Vs will be needed from a curve.