Now *really* fix self-intersections
This commit is contained in:
parent
a0c302939a
commit
94f008d3be
1 changed files with 3 additions and 2 deletions
|
|
@ -59,7 +59,8 @@
|
||||||
;; (prn other)
|
;; (prn other)
|
||||||
;; (prn (g/dist (-> node :shape :p) (-> other :shape :p)))
|
;; (prn (g/dist (-> node :shape :p) (-> other :shape :p)))
|
||||||
;; (prn )
|
;; (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))))
|
(first))))
|
||||||
|
|
||||||
(comment
|
(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]
|
(defn make-path [quadtree]
|
||||||
(when-let [seed (pick-start quadtree)]
|
(when-let [seed (pick-start quadtree)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue