error in equi-spaced-points
Created by: reiniervandijk
User can fill out u1 and u2 boundaries if he wants, which results in a set of points in the range of u1->u2. For parametric sampling this is fine, however for arc-length based sampling this will not work. See the code:
(equi-spaced-points
(number &key (spacing :arc-length) (arc-length-approximation-tolerance *zero-epsilon*)
(u1 (the u1)) (u2 (the u2))
(parameter-list (when (eql spacing :parametric) (list-of-numbers u1 u2 (/ (- u2 u1) (1- number)))))
(percentage-list (when (eql spacing :arc-length) (list-of-numbers 0 1 (/ (1- number))))))
&body body)
The line
(percentage-list (when (eql spacing :arc-length) (list-of-numbers 0 1 (/ (1- number)))))
should be
(percentage-list (when (eql spacing :arc-length)
(let ((l1 (the (total-length :u1 0 :u2 u1)))
(l2 (the (total-length :u1 0 :u2 u2))))
(list-of-numbers l1 l2 (/ (- l2 l1) (1- number))))))
Imported comments:
By genworks on 2015-01-30 00:59:28 UTC
moved to internal tracking list.