test.scm 432 Bytes
Newer Older
Hugo Hörnquist's avatar
Hugo Hörnquist committed
1 2 3 4 5 6 7 8
(load "main.scm")

(for-each
 (lambda (x y)
   (let ((ray-count 8))
     (for-each
      (lambda (theta)
        (let ((a (* tau theta)))
Hugo Hörnquist's avatar
Hugo Hörnquist committed
9 10 11 12 13
          (find-next-wall
           x y a
           (lambda (nx ny)
             (format #t "a = ~a τ (~,1f, ~,1f) => (~,1f, ~,1f), + Δ(~,1f, ~,1f)~%"
              theta x y nx ny (- nx x) (- ny y))))))
Hugo Hörnquist's avatar
Hugo Hörnquist committed
14 15 16 17
      (iota ray-count 0 1/8)))
   (newline))
 '(1.1 1.1 1.9 1.9)
 '(1.1 1.9 1.1 1.9))