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

Tree @master (Download .tar.gz)

field.lisp @masterraw · 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)))