package geoml

  1. Overview
  2. Docs
type t = Point.t * Point.t * Point.t

This module provides basic operations over quadratic bezier curves

val make : 'a -> 'b -> 'c -> 'd * 'e * 'f

Make p0 p1 p2 build a bezier curve starting in p0, and ending in p2, with p1 and as control point

val start : t -> Point.t
val ending : t -> Point.t
val control : t -> Point.t
val equation : (Point.t * Point.t * Point.t) -> float -> Point.t

equation b t returns the value of the bezier equation b(t) with t belong to 0.;1.

val points : (Point.t * Point.t * Point.t) -> int -> Point.t list

points b nb returns a list of nb points uniformly distributed on the bezier curve b.

val of_points : Point.t list -> (Point.t * Point.t * Point.t) list

returns the list of curves defined by the given points

OCaml

Innovation. Community. Security.