From 561d0f0155f4906d90eb7e73a3ff9cb28909126f Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 5 Feb 2021 09:08:39 +0100 Subject: Update project structure --- script.it/shapes/bspline.mli | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 script.it/shapes/bspline.mli (limited to 'script.it/shapes/bspline.mli') diff --git a/script.it/shapes/bspline.mli b/script.it/shapes/bspline.mli new file mode 100755 index 0000000..a36aa22 --- /dev/null +++ b/script.it/shapes/bspline.mli @@ -0,0 +1,24 @@ +type t + +type err = + [ `InvalidPath (* Too few points in the path for building the curve *) + ] + +(** Convert a list of points into a beziers curves. + + At least 4 points are required for building the path. + + [to_bezier ~connexion points] create a list of beziers segments joining all + the points together. + + [connexion0] add a virtual point in the begining for helping to get the + appropriate tangent when connecting path together + + [connexion1] does the same at the end + +*) +val to_bezier + : ?connexion0:Gg.v2 + -> ?connexion1:Gg.v2 + -> Gg.v2 list + -> (Bezier.t array, [> err]) Result.t -- cgit v1.2.3