aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grid-geometry.lisp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/grid-geometry.lisp b/src/grid-geometry.lisp
index 5fdfdd8..3597e75 100644
--- a/src/grid-geometry.lisp
+++ b/src/grid-geometry.lisp
@@ -102,7 +102,7 @@ top right corners of the bounding box for POLY "
(defmacro with-grid-bezier
- ((x y) (control-pts &key (count 1000)) &body body)
+ ((x y) (control-pts &key (count 100)) &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
@@ -118,7 +118,7 @@ Evaluates the BODY with X Y bound to a point on the bezier curve.
,control-pts)
(,fn
(apply #'bezier-lambda ,points)))
- (loop for ,a from 0.0 to 1.0 by ,step
- for (,x ,y) = (mapcar #'round (funcall ,fn ,a))
+ (loop for ,a from 0.0 to (+ 1.0 ,step) by ,step
+ for (,x ,y) = (mapcar #'round (funcall ,fn (clamp 0 ,a 1.0)))
do ,@body))))