(define-macro (rect x) `(let ((xmod2pi (- ,x (* TWOPI (floor (/ ,x TWOPI)))))) (if (< xmod2pi PI) 1.0 0.0)))