diff --git a/pluggable/textures/comp-0.png b/pluggable/plant-1/comp-0.png similarity index 100% rename from pluggable/textures/comp-0.png rename to pluggable/plant-1/comp-0.png diff --git a/pluggable/textures/comp-1-0.png b/pluggable/plant-1/comp-1-0.png similarity index 100% rename from pluggable/textures/comp-1-0.png rename to pluggable/plant-1/comp-1-0.png diff --git a/pluggable/textures/comp-1-1.png b/pluggable/plant-1/comp-1-1.png similarity index 100% rename from pluggable/textures/comp-1-1.png rename to pluggable/plant-1/comp-1-1.png diff --git a/pluggable/textures/comp-1.png b/pluggable/plant-1/comp-1.png similarity index 100% rename from pluggable/textures/comp-1.png rename to pluggable/plant-1/comp-1.png diff --git a/pluggable/textures/comp-10.png b/pluggable/plant-1/comp-10.png similarity index 100% rename from pluggable/textures/comp-10.png rename to pluggable/plant-1/comp-10.png diff --git a/pluggable/textures/comp-2-0.png b/pluggable/plant-1/comp-2-0.png similarity index 100% rename from pluggable/textures/comp-2-0.png rename to pluggable/plant-1/comp-2-0.png diff --git a/pluggable/textures/comp-2-1.png b/pluggable/plant-1/comp-2-1.png similarity index 100% rename from pluggable/textures/comp-2-1.png rename to pluggable/plant-1/comp-2-1.png diff --git a/pluggable/textures/comp-2.png b/pluggable/plant-1/comp-2.png similarity index 100% rename from pluggable/textures/comp-2.png rename to pluggable/plant-1/comp-2.png diff --git a/pluggable/textures/comp-3-0.png b/pluggable/plant-1/comp-3-0.png similarity index 100% rename from pluggable/textures/comp-3-0.png rename to pluggable/plant-1/comp-3-0.png diff --git a/pluggable/textures/comp-3-1.png b/pluggable/plant-1/comp-3-1.png similarity index 100% rename from pluggable/textures/comp-3-1.png rename to pluggable/plant-1/comp-3-1.png diff --git a/pluggable/textures/comp-3-2.png b/pluggable/plant-1/comp-3-2.png similarity index 100% rename from pluggable/textures/comp-3-2.png rename to pluggable/plant-1/comp-3-2.png diff --git a/pluggable/textures/comp-3.png b/pluggable/plant-1/comp-3.png similarity index 100% rename from pluggable/textures/comp-3.png rename to pluggable/plant-1/comp-3.png diff --git a/pluggable/textures/comp-4-0.png b/pluggable/plant-1/comp-4-0.png similarity index 100% rename from pluggable/textures/comp-4-0.png rename to pluggable/plant-1/comp-4-0.png diff --git a/pluggable/textures/comp-4.png b/pluggable/plant-1/comp-4.png similarity index 100% rename from pluggable/textures/comp-4.png rename to pluggable/plant-1/comp-4.png diff --git a/pluggable/textures/comp-5-0.png b/pluggable/plant-1/comp-5-0.png similarity index 100% rename from pluggable/textures/comp-5-0.png rename to pluggable/plant-1/comp-5-0.png diff --git a/pluggable/textures/comp-5.png b/pluggable/plant-1/comp-5.png similarity index 100% rename from pluggable/textures/comp-5.png rename to pluggable/plant-1/comp-5.png diff --git a/pluggable/textures/comp-6.png b/pluggable/plant-1/comp-6.png similarity index 100% rename from pluggable/textures/comp-6.png rename to pluggable/plant-1/comp-6.png diff --git a/pluggable/textures/comp-7.png b/pluggable/plant-1/comp-7.png similarity index 100% rename from pluggable/textures/comp-7.png rename to pluggable/plant-1/comp-7.png diff --git a/pluggable/textures/comp-8.png b/pluggable/plant-1/comp-8.png similarity index 100% rename from pluggable/textures/comp-8.png rename to pluggable/plant-1/comp-8.png diff --git a/pluggable/textures/comp-9.png b/pluggable/plant-1/comp-9.png similarity index 100% rename from pluggable/textures/comp-9.png rename to pluggable/plant-1/comp-9.png diff --git a/pluggable/textures/comp-cp-1-0.png b/pluggable/plant-1/comp-cp-1-0.png similarity index 100% rename from pluggable/textures/comp-cp-1-0.png rename to pluggable/plant-1/comp-cp-1-0.png diff --git a/pluggable/textures/comp-cp-1-1.png b/pluggable/plant-1/comp-cp-1-1.png similarity index 100% rename from pluggable/textures/comp-cp-1-1.png rename to pluggable/plant-1/comp-cp-1-1.png diff --git a/pluggable/textures/comp-cp-2-0.png b/pluggable/plant-1/comp-cp-2-0.png similarity index 100% rename from pluggable/textures/comp-cp-2-0.png rename to pluggable/plant-1/comp-cp-2-0.png diff --git a/pluggable/textures/comp-cp-2-1.png b/pluggable/plant-1/comp-cp-2-1.png similarity index 100% rename from pluggable/textures/comp-cp-2-1.png rename to pluggable/plant-1/comp-cp-2-1.png diff --git a/pluggable/textures/comp-cp-3-0.png b/pluggable/plant-1/comp-cp-3-0.png similarity index 100% rename from pluggable/textures/comp-cp-3-0.png rename to pluggable/plant-1/comp-cp-3-0.png diff --git a/pluggable/textures/comp-cp-3-1.png b/pluggable/plant-1/comp-cp-3-1.png similarity index 100% rename from pluggable/textures/comp-cp-3-1.png rename to pluggable/plant-1/comp-cp-3-1.png diff --git a/pluggable/textures/comp-cp-3-2.png b/pluggable/plant-1/comp-cp-3-2.png similarity index 100% rename from pluggable/textures/comp-cp-3-2.png rename to pluggable/plant-1/comp-cp-3-2.png diff --git a/pluggable/textures/comp-cp-4-0.png b/pluggable/plant-1/comp-cp-4-0.png similarity index 100% rename from pluggable/textures/comp-cp-4-0.png rename to pluggable/plant-1/comp-cp-4-0.png diff --git a/pluggable/textures/comp-cp-5-0.png b/pluggable/plant-1/comp-cp-5-0.png similarity index 100% rename from pluggable/textures/comp-cp-5-0.png rename to pluggable/plant-1/comp-cp-5-0.png diff --git a/pluggable/plant-2/.DS_Store b/pluggable/plant-2/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/pluggable/plant-2/.DS_Store differ diff --git a/pluggable/plant-2/comp-12.png b/pluggable/plant-2/comp-12.png new file mode 100644 index 0000000..c878f82 Binary files /dev/null and b/pluggable/plant-2/comp-12.png differ diff --git a/pluggable/plant-2/comp-14.png b/pluggable/plant-2/comp-14.png new file mode 100644 index 0000000..f32cd9a Binary files /dev/null and b/pluggable/plant-2/comp-14.png differ diff --git a/pluggable/plant-2/comp-15.png b/pluggable/plant-2/comp-15.png new file mode 100644 index 0000000..8b2c70a Binary files /dev/null and b/pluggable/plant-2/comp-15.png differ diff --git a/pluggable/plant-2/comp-2-1.png b/pluggable/plant-2/comp-2-1.png new file mode 100644 index 0000000..7632656 Binary files /dev/null and b/pluggable/plant-2/comp-2-1.png differ diff --git a/pluggable/plant-2/comp-2-10.png b/pluggable/plant-2/comp-2-10.png new file mode 100644 index 0000000..bba4b9a Binary files /dev/null and b/pluggable/plant-2/comp-2-10.png differ diff --git a/pluggable/plant-2/comp-2-13.png b/pluggable/plant-2/comp-2-13.png new file mode 100644 index 0000000..c878f82 Binary files /dev/null and b/pluggable/plant-2/comp-2-13.png differ diff --git a/pluggable/plant-2/comp-2-16.png b/pluggable/plant-2/comp-2-16.png new file mode 100644 index 0000000..8b2c70a Binary files /dev/null and b/pluggable/plant-2/comp-2-16.png differ diff --git a/pluggable/plant-2/comp-2-2.png b/pluggable/plant-2/comp-2-2.png new file mode 100644 index 0000000..ece7665 Binary files /dev/null and b/pluggable/plant-2/comp-2-2.png differ diff --git a/pluggable/plant-2/comp-2-6.png b/pluggable/plant-2/comp-2-6.png new file mode 100644 index 0000000..dba64d1 Binary files /dev/null and b/pluggable/plant-2/comp-2-6.png differ diff --git a/pluggable/plant-2/comp-3-7.png b/pluggable/plant-2/comp-3-7.png new file mode 100644 index 0000000..3bd2467 Binary files /dev/null and b/pluggable/plant-2/comp-3-7.png differ diff --git a/pluggable/plant-2/comp-3.png b/pluggable/plant-2/comp-3.png new file mode 100644 index 0000000..ad3940b Binary files /dev/null and b/pluggable/plant-2/comp-3.png differ diff --git a/pluggable/plant-2/comp-4.png b/pluggable/plant-2/comp-4.png new file mode 100644 index 0000000..596a4df Binary files /dev/null and b/pluggable/plant-2/comp-4.png differ diff --git a/pluggable/plant-2/comp-5.png b/pluggable/plant-2/comp-5.png new file mode 100644 index 0000000..dba64d1 Binary files /dev/null and b/pluggable/plant-2/comp-5.png differ diff --git a/pluggable/plant-2/comp-7-11.png b/pluggable/plant-2/comp-7-11.png new file mode 100644 index 0000000..de76a3d Binary files /dev/null and b/pluggable/plant-2/comp-7-11.png differ diff --git a/pluggable/plant-2/comp-8.png b/pluggable/plant-2/comp-8.png new file mode 100644 index 0000000..3e6dfb2 Binary files /dev/null and b/pluggable/plant-2/comp-8.png differ diff --git a/pluggable/plant-2/comp-9.png b/pluggable/plant-2/comp-9.png new file mode 100644 index 0000000..d0e558a Binary files /dev/null and b/pluggable/plant-2/comp-9.png differ diff --git a/pluggable/plant-2/comp-cp-2-1.png b/pluggable/plant-2/comp-cp-2-1.png new file mode 100644 index 0000000..2ef4e75 Binary files /dev/null and b/pluggable/plant-2/comp-cp-2-1.png differ diff --git a/pluggable/plant-2/comp-cp-2-10.png b/pluggable/plant-2/comp-cp-2-10.png new file mode 100644 index 0000000..7f2114a Binary files /dev/null and b/pluggable/plant-2/comp-cp-2-10.png differ diff --git a/pluggable/plant-2/comp-cp-2-13.png b/pluggable/plant-2/comp-cp-2-13.png new file mode 100644 index 0000000..654c80c Binary files /dev/null and b/pluggable/plant-2/comp-cp-2-13.png differ diff --git a/pluggable/plant-2/comp-cp-2-16.png b/pluggable/plant-2/comp-cp-2-16.png new file mode 100644 index 0000000..f9a5af9 Binary files /dev/null and b/pluggable/plant-2/comp-cp-2-16.png differ diff --git a/pluggable/plant-2/comp-cp-2-2.png b/pluggable/plant-2/comp-cp-2-2.png new file mode 100644 index 0000000..0c11a6a Binary files /dev/null and b/pluggable/plant-2/comp-cp-2-2.png differ diff --git a/pluggable/plant-2/comp-cp-2-6.png b/pluggable/plant-2/comp-cp-2-6.png new file mode 100644 index 0000000..3882f4a Binary files /dev/null and b/pluggable/plant-2/comp-cp-2-6.png differ diff --git a/pluggable/plant-2/comp-cp-3-7.png b/pluggable/plant-2/comp-cp-3-7.png new file mode 100644 index 0000000..9b5609e Binary files /dev/null and b/pluggable/plant-2/comp-cp-3-7.png differ diff --git a/pluggable/plant-2/comp-cp-7-11.png b/pluggable/plant-2/comp-cp-7-11.png new file mode 100644 index 0000000..733a931 Binary files /dev/null and b/pluggable/plant-2/comp-cp-7-11.png differ diff --git a/pluggable/pluggable.scm b/pluggable/pluggable.scm index 7a9ce1f..094e078 100644 --- a/pluggable/pluggable.scm +++ b/pluggable/pluggable.scm @@ -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)))