From 55ad89e92a9796979d6f075afba74a6076f45d6d Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 18 Jul 2022 09:07:05 -0500 Subject: [doc] docstring on with-grid-bezier --- src/grid-geometry.lisp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/grid-geometry.lisp b/src/grid-geometry.lisp index b23b207..c046032 100644 --- a/src/grid-geometry.lisp +++ b/src/grid-geometry.lisp @@ -102,9 +102,19 @@ top right corners of the bounding box for POLY " (defmacro with-grid-bezier - ((x y) (control-pts &key (step 0.001)) &body body) - (with-gensyms (fn points a) - `(let* ((,points + ((x y) (control-pts &key (count 1000)) &body body) + "CONTROL-POINTS is an expression that evalueates to a list of (X Y) +pairs, these are the control points for the curve.. COUNT is the +number of points on the bezier curve that will be calclated. The first +point is always the first control point and the last point is always +the last control point. Use high counts for smooth curves, as needed. + +Evaluates the BODY with X Y bound to a point on the bezier curve. +" + (with-gensyms (fn points a step) + `(let* ((,step + (/ 1.0 ,count)) + (,points ,control-pts) (,fn (apply #'bezier-lambda ,points))) -- cgit v1.2.3