[go: up one dir, main page]

Module bezier

Module bezier 

Source
Expand description

Bezier curves.

The easist way to create a bezier curve is by using the builder pattern of BezierBuilder.

let bezier = Bezier::builder()
                .elements([0.0,5.0,3.0])
                .normalized::<f64>()
                .constant::<3>()
                .build()?;
let results = [0.0,3.25,3.0];
for (value,result) in bezier.take(3).zip(results.iter().copied()){
    assert_f64_near!(value, result);
}

Bezier curves are polynomial curves with their degree given by the number of elements they consist of.

Structs§

Bezier
Bezier curve.
BezierBuilder
Builder for bezier curves.
BezierDirector
Builder for bezier interpolation.
Empty
Error returned if if there are no elements.
TooSmallWorkspace
Error returned when the workspace is too small.

Enums§

BezierError
Errors which could occur when using or creating a linear interpolation.