diff options
author | Colin Okay <colin@cicadas.surf> | 2022-07-18 09:07:05 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-07-18 09:07:05 -0500 |
commit | 55ad89e92a9796979d6f075afba74a6076f45d6d (patch) | |
tree | bf57ebc00f4673a11176dbf1a3261f145c5a2f4a /src | |
parent | 03ce5afadae02847aadd7ae89ce4779ee0b7e6e4 (diff) |
[doc] docstring on with-grid-bezier
Diffstat (limited to 'src')
-rw-r--r-- | src/grid-geometry.lisp | 16 |
1 files changed, 13 insertions, 3 deletions
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))) |