plant textures for pluging
Before Width: | Height: | Size: 234 KiB After Width: | Height: | Size: 234 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB |
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 302 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 185 KiB |
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 320 KiB |
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 218 KiB |
Before Width: | Height: | Size: 272 KiB After Width: | Height: | Size: 272 KiB |
Before Width: | Height: | Size: 307 KiB After Width: | Height: | Size: 307 KiB |
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 204 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 299 KiB After Width: | Height: | Size: 299 KiB |
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 278 KiB |
Before Width: | Height: | Size: 440 KiB After Width: | Height: | Size: 440 KiB |
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 231 KiB |
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
pluggable/plant-2/.DS_Store
vendored
Normal file
BIN
pluggable/plant-2/comp-12.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
pluggable/plant-2/comp-14.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
pluggable/plant-2/comp-15.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
pluggable/plant-2/comp-2-1.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
pluggable/plant-2/comp-2-10.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
pluggable/plant-2/comp-2-13.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
pluggable/plant-2/comp-2-16.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
pluggable/plant-2/comp-2-2.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
pluggable/plant-2/comp-2-6.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
pluggable/plant-2/comp-3-7.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
pluggable/plant-2/comp-3.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
pluggable/plant-2/comp-4.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
pluggable/plant-2/comp-5.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
pluggable/plant-2/comp-7-11.png
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
pluggable/plant-2/comp-8.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
pluggable/plant-2/comp-9.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
pluggable/plant-2/comp-cp-2-1.png
Normal file
After Width: | Height: | Size: 769 B |
BIN
pluggable/plant-2/comp-cp-2-10.png
Normal file
After Width: | Height: | Size: 785 B |
BIN
pluggable/plant-2/comp-cp-2-13.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
pluggable/plant-2/comp-cp-2-16.png
Normal file
After Width: | Height: | Size: 541 B |
BIN
pluggable/plant-2/comp-cp-2-2.png
Normal file
After Width: | Height: | Size: 714 B |
BIN
pluggable/plant-2/comp-cp-2-6.png
Normal file
After Width: | Height: | Size: 648 B |
BIN
pluggable/plant-2/comp-cp-3-7.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
pluggable/plant-2/comp-cp-7-11.png
Normal file
After Width: | Height: | Size: 1,009 B |
|
@ -62,11 +62,12 @@
|
|||
(define connection-cache '())
|
||||
|
||||
(define (get-connection-list id)
|
||||
(printf "connection ~a ~n" id)
|
||||
(let ((ret (assoc id connection-cache)))
|
||||
(cond
|
||||
(ret (cdr ret))
|
||||
(else
|
||||
(let* ((tex (load-primitive (string-append "textures/comp-cp-" id ".png")))
|
||||
(let* ((tex (load-primitive (string-append "plant-2/comp-cp-" id ".png")))
|
||||
(connections (with-primitive tex (convert-to-pos (find-centroids 0 '())))))
|
||||
(set! connection-cache (cons (cons id connections) connection-cache))
|
||||
(destroy tex)
|
||||
|
@ -78,12 +79,13 @@
|
|||
(define-struct component (root children))
|
||||
|
||||
(define (build-component id children)
|
||||
(printf "component ~a with children ~a ~n" id children)
|
||||
(cond
|
||||
((null? children)
|
||||
(let ((root (with-state
|
||||
(translate (vector 0 0.5 0))
|
||||
(hint-ignore-depth)
|
||||
(texture (load-texture (string-append "textures/comp-" id ".png")))
|
||||
(texture (load-texture (string-append "plant-2/comp-" id ".png")))
|
||||
(build-plane))))
|
||||
(with-primitive root (apply-transform))
|
||||
(make-component root '())))
|
||||
|
@ -91,7 +93,7 @@
|
|||
(let* ((connection-list (get-connection-list id))
|
||||
(root (with-state
|
||||
(translate (vector 0 0.5 0))
|
||||
(texture (load-texture (string-append "textures/comp-" id ".png")))
|
||||
(texture (load-texture (string-append "plant-2/comp-" id ".png")))
|
||||
(build-plane)))
|
||||
(comp (make-component root
|
||||
(map
|
||||
|
@ -121,7 +123,7 @@
|
|||
(list-ref l (random (length l))))
|
||||
|
||||
(define (make-random-plant depth)
|
||||
(let ((num-children (if (> depth 10) 0 (choose (list 0 1 2 3)))))
|
||||
(let ((num-children (if (> depth 10) 0 (choose (list 0 2 3)))))
|
||||
(cond
|
||||
((eq? num-children 0) (list (choose (list "0" "0")) (list)))
|
||||
((eq? num-children 1) (list "1-1" (list (make-random-plant (+ depth 1)))))
|
||||
|
@ -146,7 +148,7 @@
|
|||
(define p (make-random-plant 0))
|
||||
(display p) (newline)
|
||||
|
||||
(define c (build-component "1-1" (list p)))
|
||||
(define c (build-component "7-11" (list p)))
|
||||
|
||||
|
||||
|
||||
|
|