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§
Provided Methods§
Sourcefn sample_dt(&self, t: f64) -> Vector2d
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.
Sourcefn sample_dt2(&self, t: f64) -> Vector2d
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.