                              (dt/point value)]))
           {:step 1 :p1 value}) 
       1 (let [p1 (:p1 current-state)
-              circle (dt/circle p1 (geom/distance p1 value))
-              _ (println "circle: " circle)]
+              circle (dt/circle p1 (geom/distance p1 value))]
           (go (>! out circle)
               (>! out [:draw :circle draw-chan]))
           {:step 0}))))

                             (dt/point value)]))
          {:step 1 :p1 value}) 
      1 (let [p1 (:p1 current-state)
              line (dt/line [p1 value])
              _ (println "line: " line)]
          (go (>! out [:draw :triangle draw-chan]))
          {:step 2 :p1 p1 :p2 value})
      2 (let [p1 (:p1 current-state)
              p2 (:p2 current-state)
              triangle (dt/triangle p1 p2 value)
              _ (println "triangle: " triangle)]
          (go (>! out triangle)
              (>! out [:draw :triangle draw-chan]))
          {:step 0}))))

(defn draw-triangle
  "draw triangle p1 p2 p3 in draw-chan with options"
  [p1 p2 p3 draw-chan options]
  (let [circumcenter (geom/circumcenter [p1 p2 p3])]
    (when (contains? options :circumcircle)
      (draw-circle-2 circumcenter (geom/distance p1 circumcenter)
                     draw-chan {:stroke :blue :fill :lt-blue})
      (draw-line p1 circumcenter draw-chan #{} :yellow)
      (draw-line p2 circumcenter draw-chan #{} :yellow)
      (draw-line p3 circumcenter draw-chan #{} :yellow))
    (draw-line p1 p2 draw-chan #{:perp-bisector} :red)
    (draw-line p2 p3 draw-chan #{:perp-bisector} :red)
    (draw-line p3 p1 draw-chan #{:perp-bisector} :red)
