;;;CC1-PARTIE1 (defparameter *pas* (/ 1 10000)) (defun DERIVE (f) (lambda (u) (/(-(funcall f (+ u *pas*))(funcall f (+ u 0))) *pas*))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;CC1-PARTIE2 ;;; A zone is represented as a function that takes a point in 2-dimensional ;;; space as a parameter (represented as a complex number), and returns T ;;; if and only if the point is in the zone, and NIL otherwise. ;;; To determine whether a point is in a zone, just call this function (defun point-in-zone-p (point zone) (funcall zone point)) ;;; Create a circular zone with center in (0,0) with the indicated radius. (defun make-disk (radius) (lambda (p) (<= (abs p) radius))) ;;; Given a zone, move it by a vector indicated as a complex number ;;; passed as the argument. (defun move-zone (zone vector) (lambda (p) (point-in-zone-p (- p vector) zone)))