git.haldean.org plotter / b6aeb9b field.lisp
b6aeb9b

Tree @b6aeb9b (Download .tar.gz)

field.lisp @b6aeb9braw · history · blame

(load "package.lisp")
(load "svg.lisp")
(in-package :so3-cnc)

(defun L (i j)
  (let* ((x (* (1+ i) 3))
         (y (* (1+ j) 3))
         (theta (* pi (/ (+ j) n) (+ 1 (expt (/ i 174) 0.8))))
         (dx (* 1.0 (sin theta)))
         (dy (* 1.0 (cos theta))))
    (list (cons (- x dx) (- y dy)) (cons (+ x dx) (+ y dy)))
    ))

(defun Ls ()
  (gathering
   (loop for i from 0 to n
         do (loop for j from 0 to n do (gather (L i j))))))

(defun ill-x.svg () (x.svg (Ls)))