 (ns clj-turtle.core
   (:require [turtle.core :refer [draw!]]
             [turtle.renderer.vector :refer [->svg]]))
+
+(def base-angle 60)
 
 (defn- there-and-back
   [len]

     :left angle-c :fwd sector-len
     :right angle-d :fwd len]))

(defn flake
  [len star-len angle]
  (let [star-gap (- len star-len (* (/ len 10) 3))
        single-part (concat
                     (arrow len)
                     [:fwd star-gap]
                     (sector angle star-len)
                     [:right 60])
        cycle-len (* 6 (count single-part))]
    (take cycle-len (cycle single-part))))



(defn- sector
  [angle len]
  (let [angle-b (- base-angle angle)
        angle-c (- 120 (* 2 angle))
        angle-d (- 180 angle)
        sector-len (/ (/ len 2) (Math/cos (Math/toRadians angle-b)))]
