ParametricCurve2d

Trait ParametricCurve2d 

Source
pub trait ParametricCurve2d {
    // Required methods
    fn sample(&self, t: f64) -> Point2d;
    fn bounds(&self) -> Interval<f64>;

    // Provided methods
    fn sample_dt(&self, t: f64) -> Vector2d { ... }
    fn sample_dt2(&self, t: f64) -> Vector2d { ... }
}
Expand description

A parametric curve in 2D space.

Required Methods§

Source

fn sample(&self, t: f64) -> Point2d

Samples the parametric curve.

Source

fn bounds(&self) -> Interval<f64>

Returns the minimum and maximum t-values that define the bounds of the curve.

Provided Methods§

Source

fn sample_dt(&self, t: f64) -> Vector2d

Samples the derivative of the parametric curve.

The default implementation approximates the derivative by sampling two very nearby points along the curve.

Source

fn sample_dt2(&self, t: f64) -> Vector2d

Samples the second derivative of the parametric curve.

The default implementation approximates the derivative by sampling two very nearby points along the curve.

Implementations on Foreign Types§

Source§

impl<T: ParametricCurve2d + ?Sized> ParametricCurve2d for &T

Source§

fn sample(&self, t: f64) -> Point2d

Source§

fn bounds(&self) -> Interval<f64>

Source§

fn sample_dt(&self, t: f64) -> Vector2d

Source§

fn sample_dt2(&self, t: f64) -> Vector2d

Implementors§