plant textures for pluging

This commit is contained in:
nik gaffney 2009-04-29 13:22:10 +02:00
parent e355094c67
commit 4538a20a1a
55 changed files with 7 additions and 5 deletions

View file

Before

Width:  |  Height:  |  Size: 234 KiB

After

Width:  |  Height:  |  Size: 234 KiB

View file

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View file

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 158 KiB

View file

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 302 KiB

View file

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View file

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 185 KiB

View file

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 236 KiB

View file

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 320 KiB

View file

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB

View file

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 272 KiB

View file

Before

Width:  |  Height:  |  Size: 307 KiB

After

Width:  |  Height:  |  Size: 307 KiB

View file

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 236 KiB

View file

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 204 KiB

View file

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View file

Before

Width:  |  Height:  |  Size: 299 KiB

After

Width:  |  Height:  |  Size: 299 KiB

View file

Before

Width:  |  Height:  |  Size: 278 KiB

After

Width:  |  Height:  |  Size: 278 KiB

View file

Before

Width:  |  Height:  |  Size: 440 KiB

After

Width:  |  Height:  |  Size: 440 KiB

View file

Before

Width:  |  Height:  |  Size: 231 KiB

After

Width:  |  Height:  |  Size: 231 KiB

View file

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 160 KiB

View file

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
pluggable/plant-2/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,009 B

View file

@ -62,11 +62,12 @@
(define connection-cache '()) (define connection-cache '())
(define (get-connection-list id) (define (get-connection-list id)
(printf "connection ~a ~n" id)
(let ((ret (assoc id connection-cache))) (let ((ret (assoc id connection-cache)))
(cond (cond
(ret (cdr ret)) (ret (cdr ret))
(else (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 '()))))) (connections (with-primitive tex (convert-to-pos (find-centroids 0 '())))))
(set! connection-cache (cons (cons id connections) connection-cache)) (set! connection-cache (cons (cons id connections) connection-cache))
(destroy tex) (destroy tex)
@ -78,12 +79,13 @@
(define-struct component (root children)) (define-struct component (root children))
(define (build-component id children) (define (build-component id children)
(printf "component ~a with children ~a ~n" id children)
(cond (cond
((null? children) ((null? children)
(let ((root (with-state (let ((root (with-state
(translate (vector 0 0.5 0)) (translate (vector 0 0.5 0))
(hint-ignore-depth) (hint-ignore-depth)
(texture (load-texture (string-append "textures/comp-" id ".png"))) (texture (load-texture (string-append "plant-2/comp-" id ".png")))
(build-plane)))) (build-plane))))
(with-primitive root (apply-transform)) (with-primitive root (apply-transform))
(make-component root '()))) (make-component root '())))
@ -91,7 +93,7 @@
(let* ((connection-list (get-connection-list id)) (let* ((connection-list (get-connection-list id))
(root (with-state (root (with-state
(translate (vector 0 0.5 0)) (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))) (build-plane)))
(comp (make-component root (comp (make-component root
(map (map
@ -121,7 +123,7 @@
(list-ref l (random (length l)))) (list-ref l (random (length l))))
(define (make-random-plant depth) (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 (cond
((eq? num-children 0) (list (choose (list "0" "0")) (list))) ((eq? num-children 0) (list (choose (list "0" "0")) (list)))
((eq? num-children 1) (list "1-1" (list (make-random-plant (+ depth 1))))) ((eq? num-children 1) (list "1-1" (list (make-random-plant (+ depth 1)))))
@ -146,7 +148,7 @@
(define p (make-random-plant 0)) (define p (make-random-plant 0))
(display p) (newline) (display p) (newline)
(define c (build-component "1-1" (list p))) (define c (build-component "7-11" (list p)))