Now *really* fix self-intersections

This commit is contained in:
arne 2022-12-19 08:14:16 +01:00
commit 94f008d3be

View file

@ -59,7 +59,8 @@
;; (prn other)
;; (prn (g/dist (-> node :shape :p) (-> other :shape :p)))
;; (prn )
(> (g/dist (-> node :shape :p) (-> other :shape :p))) (+ (-> node :shape :r) (-> other :shape :r))) path))))
(>= (g/dist (-> node :shape :p) (-> other :shape :p))
(* 0.99 (+ (-> node :shape :r) (-> other :shape :r))))) path)))) ;; floating point errors?
(first))))
(comment
@ -67,7 +68,7 @@
)
;; let's generate different paths of hyphae, each a most 50 nodes long
;; let's generate different paths of hyphae, each at most `max-path-length` nodes long
(defn make-path [quadtree]
(when-let [seed (pick-start quadtree)]