left fridge
This commit is contained in:
parent
92422369dc
commit
97026b64e5
2 changed files with 15 additions and 9 deletions
|
@ -205,21 +205,27 @@
|
||||||
;; distribute parents of given node evenly along a containment circle
|
;; distribute parents of given node evenly along a containment circle
|
||||||
;; centered on the node.
|
;; centered on the node.
|
||||||
|
|
||||||
(dotimes (i n)
|
(dotimes (k n)
|
||||||
(let ((parent (list-ref parents i))
|
(let ((parent (list-ref parents k))
|
||||||
(x1 (* r (cos (* (* (+ t1 (- t2 t1)) (/ i n))))))
|
(x1 (* r (cos (* (+ t1 (- t2 t1)) (/ k n)))))
|
||||||
(y1 (* r (sin (* (* (+ t1 (- t2 t1)) (/ i n)))))))
|
(y1 (* r (sin (* (+ t1 (- t2 t1)) (/ k n))))))
|
||||||
(send pb move-to parent
|
(send pb move-to parent
|
||||||
(+ xi x1) (+ yi y1))
|
(+ xi x1) (+ yi y1))
|
||||||
|
|
||||||
;; draw circles around the node’s parents and evenly distribute their
|
;; draw circles around the node’s parents and evenly distribute their
|
||||||
;; parents along containment arcs.
|
;; parents along containment arcs.
|
||||||
|
|
||||||
|
(debug 1 "----~a~% x1:~a~% y1:~a~% t1':~a~% t2':~a~%"
|
||||||
|
parent
|
||||||
|
x1 y1
|
||||||
|
(- (/ pi 2) (atan (/ (- yi y1) (- xi x1))))
|
||||||
|
(+ (/ pi 2) (atan (/ (- yi y1) (- xi x1)))))
|
||||||
|
|
||||||
(shadowpi-tree parent pb
|
(shadowpi-tree parent pb
|
||||||
(+ xi x1) (+ yi y1) ;; centred on
|
(+ xi x1) (+ yi y1) ;; centred on
|
||||||
|
|
||||||
(atan (/ (- y1 yi) (- x1 xi)))
|
(- (atan (/ (- yi y1) (- xi x1))) (/ pi 2))
|
||||||
(+ pi (atan (/ (- y1 yi) (- x1 xi))))
|
(+ (/ pi 2) (atan (/ (- yi y1) (- xi x1))))
|
||||||
|
|
||||||
(* r phi)) ;; radius
|
(* r phi)) ;; radius
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
[(#\z) ;; C-z re.colour
|
[(#\z) ;; C-z re.colour
|
||||||
(colour-tree selected-snip p)]
|
(colour-tree selected-snip p)]
|
||||||
[(#\x) ;; C-x re.lapse
|
[(#\x) ;; C-x re.lapse
|
||||||
(shadowpi-tree selected-snip p 0 0 0 (* 2 pi) 120)]
|
(shadowpi-tree selected-snip p 10 10 0 (* 2 pi) 120)]
|
||||||
[(#\=) ;; C-= zoom->out
|
[(#\=) ;; C-= zoom->out
|
||||||
(send p zoom 1.1)]
|
(send p zoom 1.1)]
|
||||||
[(#\-) ;; C-- zoom->in
|
[(#\-) ;; C-- zoom->in
|
||||||
|
|
Loading…
Reference in a new issue