anchor.diff:          (ellipse-point* lambda2 center-x center-y
                           radius1-dx radius1-dy radius2-dx radius2-dy)
         (multiple-value-bind (e1x e1y e2x e2y)
  -          (ellipse-cubic-bezier-control-points lambda1 lambda2
  -                                               center-x center-y
  -                                               radius1-dx radius1-dy radius2-dx radius2-dy)
  +          (ellipse-cubic-bezier-control-points* lambda1 lambda2
  +                                                radius1-dx radius1-dy radius2-dx radius2-dy)
           (values p1x p1y
                   (+ p1x e1x) (+ p1y e1y)
                   (- p2x e2x) (- p2y e2y)
  
positive.code: draws an ellipse arc between the two angles, or a pie-wedge if filled
  is T."
    (let ((first-segment t))
      (flet ((draw-ellipse-segment (lambda1 lambda2)
               (multiple-value-bind (p1x p1y q1x q1y q2x q2y p2x p2y)
                   (ellipse-cubic-bezier-points lambda1 lambda2
                                                center-x center-y
                                                radius1-dx radius1-dy radius2-dx radius2-dy)
                 (with-transformed-position (tr p1x p1y)
                   (with-transformed-position (tr q1x q1y)
                     (with-transformed-position (tr q2x q2y)
                       (with-transformed-position (tr p2x p2y)
                         (when first-segment
                           (pdf:move-to p1x p1y)
                           (setf first-segment nil))
                         (pdf:bezier-to q1x q1y q2x q2y p2x p2y))))))))
        (if (or (and start-angle end-angle
                     (zerop start-angle) (= (* pi 2) end-angle))
                (and start-angle end-angle
                     (zerop end-angle) (= (* pi 2) start-angle)))
            (let* ((sweep (* pi 2))
                   (step (/ sweep 4)))
              (let ((a 0)
                    (b (+ start-angle step)))
                (loop for i below 4
                   do (draw-ellipse-segment a b)
                     (incf a step)
                     (incf b step))))
            (flet ((clamp-angle (angle)
                     (min (max 0 angle) (* pi 2))))
              (let ((start-angle (clamp-angle start-angle))
                    (end-angle (clamp-angle end-angle)))
                (let* ((sweep (- end-angle start-angle))
                       (segment-count (ceiling (abs (/ sweep (/ pi 2)))))
                       (step (/ sweep segment-count)))
                  (let ((a start-angle)
                        (b (+ start-angle step)))
                    (loop for i below segment-count
                       do (draw-ellipse-segment (- (transform-angle tr a))
                                                (- (transform-angle tr b)))
                         (incf a step)
                         (incf b step)))))
              (when filled
                (with-transformed-position (tr center-x center-y)
                  (pdf:line-to center-x center-y))))))))
  
  (defmethod medium-draw-ellipse* ((medium pdf-medium) center-x center-y
                                   radius1-dx radius1-dy radius2-dx radius2-dy
  
negative.code: LAMBDA0 is different from that used in ELLIPSE-POINT, which is relative
  to the major axis."
    (multiple-value-bind (a b theta)
        (reparameterize-ellipse radius1-dx radius1-dy radius2-dx radius2-dy)
      (ellipse-point (- lambda0 theta) center-x center-y a b theta)))
  
  (defun ellipse-derivative (eta a b theta)
  