pub trait ParametricFunction2D {
    // Required method
    fn evaluate(&self, t: T) -> Point;

    // Provided methods
    fn linspace(&self, n: usize) -> Vec<Point> { ... }
    fn start(&self) -> Point { ... }
    fn end(&self) -> Point { ... }
    fn random_point(&self) -> Point { ... }
    fn random_points(&self, n: usize) -> Vec<Point> { ... }
}
Expand description

2D parametric function trait

Required Methods§

source

fn evaluate(&self, t: T) -> Point

returns the value of the parametric function at the point t

Provided Methods§

source

fn linspace(&self, n: usize) -> Vec<Point>

returns n equally spaced points along the entire parametric function from T::start to T::end

source

fn start(&self) -> Point

returns start, or “first”, point on the parametric function

source

fn end(&self) -> Point

returns end, or“last“, point on the parametric function

source

fn random_point(&self) -> Point

return a random point on the parametric function

source

fn random_points(&self, n: usize) -> Vec<Point>

return n random points on the parametric function

Implementations on Foreign Types§

source§

impl<F, G> ParametricFunction2D for (F, G)where F: ParametricFunction1D, G: ParametricFunction1D,

source§

fn evaluate(&self, t: T) -> Point

Implementors§