Since I already had the binary search and interpolation code, it was just a matter of writing different samplers for ellipses and Bézier curves.
;; make a sampler function for a bezier curve (defun make-bezier-sampler (p0 p1 p2 p3) (lambda (k) (decasteljau p0 p1 p2 p3 k))) ;; make a sampler function for an ellipse (defun make-ellipse-sampler (center xradius yradius) (lambda (k) (let ((x (* xradius (cos k))) (y (* yradius (sin k)))) (make-point (+ x (xcoord center)) (+ y (ycoord center))))))
Equal angle increments:
Equal circumferential distances: