plant-eyelids -> orthographic eyelid misting

This commit is contained in:
nik gaffney 2009-08-03 12:11:39 +02:00
parent 179899697d
commit 63fdd7dbc6
91 changed files with 21589 additions and 0 deletions

BIN
plant-eyelids/.DS_Store vendored Normal file

Binary file not shown.

3
plant-eyelids/README Normal file
View file

@ -0,0 +1,3 @@
This is a temporary fork of 'plant-eyes' to facilitate further
fiddling without too much detriment to 'plant-eyes'

Binary file not shown.

86
plant-eyelids/client.ss Normal file
View file

@ -0,0 +1,86 @@
#lang scheme
(require scheme/class "jabberer.ss" "message.ss" "list-utils.ss")
(provide (all-defined-out))
; the client listens to all the messages from the logic side
; and decides which ones to send out to the network
; it also listens to the network and pokes the logic with updates
(define client%
(class object%
(init-field
(jid "none@nowhere")
(pass "xxxx"))
(field
(all-plants
(list
"plant0000001@fo.am"
"plant0000002@fo.am"
"plant0000003@fo.am"
;"plant0000004@fo.am"
;"plant0000005@fo.am"
"dave@fo.am"
))
(plants-present '())
(msg-filter (list 'new-pickup 'pick-up-pickup)) ; messages we don't want to send across the network
(jab (make-object jabberer% jid pass)))
(define/public (setup)
(send jab start)
(send-msg all-plants (make-object message% 'hello-world (list (list 'plant-id jid)))))
(define/public (send-msg recipients msg)
(for-each
(lambda (plant)
(when (not (string=? plant jid)) ; dont send to ourselves!
(send jab send-msg plant (send msg to-string))))
recipients))
(define (heir-send to l)
(for-each
(lambda (msg)
(cond ((not (list? msg))
(send-msg (list to) msg))
(else
(heir-send to msg))))
l))
(define (fetch-messages l game-logic)
(cond ((not (send jab msg-waiting?)) l)
(else
(let* ((msg (send jab get-msg))
(from (car msg))
(body (cadr msg)))
; build a message from the xmpp message
(let ((msg (make-object message%)))
(send msg from-string body)
(let ((name (send msg get-name)))
; filter out the messages we need to respond to
; (and don't need sending to the rest of the game)
(cond
((eq? name 'hello-world)
(printf "received hello-world from ~a~n" (send msg get-data 'plant-id))
(set! plants-present (cons (send msg get-data 'plant-id) plants-present))
(send-msg (list from) (make-object message% 'i-am-here (list (list 'plant-id jid))))
; send out our plant description messages
(heir-send from (send game-logic serialise))
(fetch-messages l game-logic))
((eq? name 'i-am-here)
(set! plants-present (cons (send msg get-data 'plant-id) plants-present))
(printf "received i-am-here ~a~n" plants-present)
(fetch-messages l game-logic)) ; todo: send plant to view
(else
(fetch-messages (cons msg l) game-logic)))))))))
(define/public (update messages game-logic)
(for-each
(lambda (msg)
(when (not (list-contains (send msg get-name) msg-filter))
(send-msg all-plants msg))) ; todo - need to send to plants-present only
messages)
(fetch-messages messages game-logic)) ; add get messages from the network on
(super-new)))

160
plant-eyelids/controller.ss Normal file
View file

@ -0,0 +1,160 @@
#lang scheme/base
(require scheme/class fluxus-016/fluxus "logic.ss" "view.ss")
(provide (all-defined-out))
; reads input events and tells the logic side what to do
(define controller%
(class object%
(init-field
(game-view #f))
(field
(fwd (vector 0 0 1))
(up (vector 0 1 0))
(pos (vector 0 0 0))
(mtx (mident))
(cam (build-locator))
(current-twig #f)
(current-twig-growing #f)
(current-point 0)
(tilt 0)
(yaw 0)
(player-plant #f)
(player-pos (vector 0 0 0))
(last-pos (vector 0 0 0)))
(define/public (set-player-plant s)
(set! pos (send s get-pos))
(set! player-pos (send s get-pos))
(set! player-plant s))
(define/public (get-cam-obj)
cam)
(define/public (set-pos s)
(set! pos s))
(define/public (set-fwd s)
(set! fwd s))
(define/public (get-fwd)
fwd)
(define/public (setup)
(lock-camera cam)
(camera-lag 0.2)
(clip 1 1000)
(set-camera-transform (mtranslate (vector 0 0 -4))))
; moveme
(define (collide? line objs)
(foldl
(lambda (ob r)
(if r r
(with-primitive ob
(cond ((bb/point-intersect? (cadr line) 0)
(cond
((not (null? (geo/line-intersect
(car line) (cadr line))))
#t)
(else #f)))
(else #f)))))
#f
objs))
(define/public (update)
(when (and (key-pressed " ") (not current-twig-growing))
(set! last-pos pos)
(cond (current-twig
(let ((new-twig (send player-plant add-sub-twig current-twig current-point
(vector 0 1 0) #;(vsub (send current-twig get-point current-point)
(send current-twig get-point (- current-point 1))))))
(set! current-twig-growing #t)
(set! current-twig new-twig)))
(else
(set! current-twig (make-object twig-logic% (vector 0 0 0) 0 player-plant 'root
(vmul fwd -1)
start-twig-width max-twig-points 'extruded))
(send player-plant add-twig current-twig)
(set! current-twig-growing #t))))
(when (and (key-pressed "f") current-twig-growing)
(let ((vel (vmul fwd -0.1)))
(when
(not (collide? (list pos (vadd pos vel)) (send game-view get-stones)))
(set! pos (vadd pos vel))
(when (> (vdist last-pos pos) (send current-twig get-dist))
(set! last-pos pos)
(send player-plant grow (vsub pos player-pos))))))
(when (or (key-pressed "a") (key-special-pressed 100)) (set! yaw (+ yaw 2)))
(when (or (key-pressed "d") (key-special-pressed 102)) (set! yaw (- yaw 2)))
(when (or (key-pressed "w") (key-special-pressed 101)) (set! tilt (- tilt 2)))
(when (or (key-pressed "s") (key-special-pressed 103)) (set! tilt (+ tilt 2)))
;; zoom in/out
(when (key-pressed "-") (set-ortho-zoom 10))
(when (key-pressed "=") (set-ortho-zoom 100))
; clamp tilt to prevent gimbal lock
(when (> tilt 88) (set! tilt 88))
(when (< tilt -88) (set! tilt -88))
(when (not current-twig-growing)
(when (key-pressed "q")
(cond ((not current-twig)
(set! current-twig (send player-plant get-twig-from-dir (vmul fwd -1)))
(set! current-point 2))
(else
(when (< current-point (- (send current-twig get-num-points) 1))
(set! current-point (+ current-point 1))))))
(when (key-pressed "z")
(cond (current-twig
(set! current-point (- current-point 1))
(when (< current-point 2)
(set! current-twig #f)
(set! pos player-pos)
#;(set-camera-transform (mtranslate (vector 0 0 -1))))))))
; get camera fwd vector from key-presses
(set! fwd (vtransform (vector 0 0 1)
(mmul
(mrotate (vector 0 yaw 0))
(mrotate (vector tilt 0 0)))))
; if we are on a twig not growing
(cond ((and current-twig (not current-twig-growing))
(set! pos (vadd player-pos (send current-twig get-point current-point)))
#;(when (> current-point 0)
(set! fwd (vmix fwd (vnormalise (vsub (send current-twig get-point
(- current-point 1))
pos)) 0.5))))
(else
(when current-twig-growing
#;(let ((twig-view (send (send game-view get-plant (send player-plant get-id))
get-twig (send current-twig get-id))))
(when twig-view
(set! pos (vadd player-pos (vsub (send twig-view get-end-pos)
(vmul (send current-twig get-dir) 1))))))
(when (not (send current-twig growing?))
(set! current-twig-growing #f)
(set! current-point (- (send current-twig get-num-points) 1))))))
(let* ((side (vnormalise (vcross up fwd)))
(up (vnormalise (vcross fwd side))))
(with-primitive cam
(identity)
(concat (vector (vx side) (vy side) (vz side) 0
(vx up) (vy up) (vz up) 0
(vx fwd) (vy fwd) (vz fwd) 0
(vx pos) (vy pos) (vz pos) 1)))))
(super-new)))

188
plant-eyelids/extrude.scm Normal file
View file

@ -0,0 +1,188 @@
;#lang scheme
;(require fluxus-016/drflux)
; extrusion code
(define (draw-profile index profile offset)
(cond ((not (null? profile))
(pdata-set! "p" index (vadd (car profile) offset))
(draw-profile (+ index 1) (cdr profile) offset))))
(define (transform-profile profile m)
(cond
((null? profile) '())
(else
(cons (vtransform (car profile) m)
(transform-profile (cdr profile) m)))))
; figures out the vector for rotation of the profile
(define (path-vector first-segment path lv)
(let* ((v (if (null? (cdr path)) ; last segment?
lv ; use the last vector used
(vsub (cadr path) (car path)))) ; use the next point
(vd (if first-segment v ; first segment?
(vadd (vmul lv 0.5) ; blend with the last vector
(vmul v 0.5)))))
vd))
(define (extrude-segment index profile path width lv up size)
(cond ((not (null? path))
(let ((v (path-vector (zero? index) path lv)))
(draw-profile index (transform-profile profile
(mmul
(maim v up)
(mrotate (vector 0 90 0))
(mscale (vmul (vector (car width) (car width) (car width)) size))))
(car path))
v))))
(define (extrude index profile path width lv up)
(cond ((not (null? path))
(let ((v (extrude-segment index profile path width lv up 1)))
(extrude (+ index (length profile)) profile (cdr path) (cdr width) v up)))))
(define (stitch-face index count profile-size in)
(cond
((eq? 1 count)
(append in (list (+ (- index profile-size) 1) index (+ index profile-size)
(+ (- index profile-size) 1 profile-size))))
(else
(append
(list (+ index 1) index
(+ index profile-size) (+ index profile-size 1))
(stitch-face (+ index 1) (- count 1) profile-size in)))))
(define (stitch-indices index profile-size path-size in)
(cond
((eq? 1 path-size) in)
(else
(append
(stitch-face index profile-size profile-size '())
(stitch-indices (+ index profile-size)
profile-size
(- path-size 1)
in)))))
(define (build-tex-coords profile-size path-size vscale)
(pdata-index-map!
(lambda (i t)
(vector (* vscale (/ (quotient i profile-size) path-size))
(/ (modulo i profile-size) profile-size) 0))
"t"))
(define (build-extrusion profile path width tex-vscale up)
(let ((p (build-polygons (* (length profile) (length path)) 'quad-list)))
(with-primitive p
(poly-set-index (stitch-indices 0 (length profile) (length path) '()))
(build-tex-coords (length profile) (length path) tex-vscale)
(extrude 0 profile path width (vector 0 0 0) up)
(recalc-normals 0))
p))
; partial extrusions are for animating
(define (build-partial-extrusion profile path tex-vscale)
(let ((p (build-polygons (* (length profile) (length path)) 'quad-list)))
(with-primitive p
(poly-set-index (stitch-indices 0 (length profile) (length path) '()))
(build-tex-coords (length profile) (length path) tex-vscale))
p))
(define (partial-extrude t profile path width up grow)
(define (chop-front l n)
(cond ((null? l) l)
(else
(if (zero? n) (cons (car l) (chop-front (cdr l) n))
(chop-front (cdr l) (- n 1))))))
(define (collapse-front)
(let ((start (* (floor t) (length profile))))
(for ((i (in-range (+ start (* (length profile) 1)) (pdata-size))))
(pdata-set! "p" i (pdata-ref "p" start)))))
(define (scale-front)
(when (> t 1)
(let* ((start (* (floor t) (length profile)))
(from (list-ref path (- (inexact->exact (floor t)) 1)))
(to (list-ref path (+ (inexact->exact (floor t)) 0))))
(for ((i (in-range start (+ start (length profile)))))
(pdata-set! "p" i (vmix (pdata-ref "p" i)
(vmix to from (- t (floor t))) (- t (floor t))))))))
(define (_ t v g)
(cond
((< t 1) (with-primitive p (recalc-normals 0)) v)
(else
(let ((start (* (floor t) (length profile))))
(_ (- t 1)
(extrude-segment start profile
(chop-front path (floor t))
(chop-front width (floor t)) v up
(if (< g 1)
(+ g (* (- t (floor t)) grow))
g))
(if (< g 1)
(+ g grow)
1))))))
(_ t (vector 0 0 0) 0)
(scale-front)
(collapse-front)
)
(define (build-circle-profile n r)
(define (_ n c l)
(cond ((zero? c) l)
(else
(let ((a (* (/ c n) (* 2 3.141))))
(_ n (- c 1)
(cons (vmul (vector (sin a) (cos a) 0) r) l))))))
(_ n n '()))
(clear)
(clear-colour 0.5)
(define profile (build-circle-profile 12 0.5))
(define width (build-list 100
(lambda (n) (* n 0.01 (+ 1.5 (cos (* 0.5 n)))))))
(define path (build-list 100
(lambda (n) (vmul (vector (sin (* 0.2 n)) 0 (cos (* 0.2 n))) (* 0.05 n)))))
(define p (with-state
(wire-colour 0)
; (colour (vector 0.5 0.3 0.2))
(colour (vector 1 1 1))
(specular (vector 1 1 1))
(shinyness 20)
(hint-wire)
(texture (load-texture "textures/root.png"))
(build-partial-extrusion profile path 10)))
#;(with-state
(wire-opacity 0.4)
(translate (vector 0 0 0))
(wire-colour (vector 0 0 1))
(hint-none)
(hint-wire)
; (hint-normal)
(backfacecull 1)
(point-width 5)
(build-extrusion profile path width 1 (vector 0 1 0)))
(define t 0)
(define (animate)
(with-primitive p
(partial-extrude
(* (* 0.5 (+ 1 (sin (* 0.2 t)))) (length path))
profile path width (vector 0 1 0) 0.05)
(set! t (+ t 0.01))))
(every-frame (animate))
(end-framedump)
;(start-framedump "ext-" "jpg")

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

60
plant-eyelids/jabberer.ss Normal file
View file

@ -0,0 +1,60 @@
#lang scheme/base
(require scheme/class openssl (prefix-in xmpp: "xmpp.ss"))
(provide (all-defined-out))
; a class which wraps the xmpp in a thread and allows messages to be picked up
; and sent by the game
(define debug-netloop #f)
(define jabberer%
(class object%
(init-field
(jid "none@nowhere")
(pass "xxxx"))
(field
(incoming '())
(outgoing '())
(thr 0)
(debug-jab #f))
(define/public (get-incoming)
incoming)
(define/public (clear-incoming)
(set! incoming '()))
(define/public (msg-waiting?)
(not (null? incoming)))
(define/public (get-msg)
(let ((msg (car incoming)))
(set! incoming (cdr incoming))
msg))
(define/public (send-msg to msg)
(set! outgoing (append outgoing (list (list to msg)))))
(define (message-handler sz)
(when debug-jab (printf "rx <---- ~a ~a~n" (xmpp:message-from sz) (xmpp:message-body sz)))
(set! incoming (cons (list (xmpp:message-from sz) (xmpp:message-body sz)) incoming)))
(define/public (start)
(set! thr (thread run)))
(define/public (stop)
(kill-thread thr))
(define (run)
(xmpp:with-xmpp-session jid pass
(xmpp:set-xmpp-handler 'message message-handler)
(let loop ()
(when debug-netloop (printf ".~n"))
(when (not (null? outgoing))
(when debug-jab (printf "tx ----> ~a ~a~n" (car (car outgoing)) (cadr (car outgoing))))
(xmpp:send (xmpp:message (car (car outgoing)) (cadr (car outgoing))))
(set! outgoing (cdr outgoing)))
(sleep 0.221)
(loop))))
(super-new)))

View file

@ -0,0 +1,50 @@
#lang scheme/base
(provide (all-defined-out))
; just some stuff which is probably defined in standard schemish somewhere
(define (assoc-remove k l)
(cond
((null? l) '())
((eq? (car (car l)) k)
(assoc-remove k (cdr l)))
(else
(cons (car l) (assoc-remove k (cdr l))))))
(define (choose l)
(list-ref l (random (length l))))
(define (list-contains k l)
(cond
((null? l) #f)
((eq? (car l) k) #t)
(else (list-contains k (cdr l)))))
(define (string-split s c)
(define (_ sl tl cl)
(cond
((null? sl) (if (null? cl) tl (append tl (list (list->string cl)))))
((eq? (car sl) c)
(_ (cdr sl) (append tl (list (list->string cl))) '()))
(else
(_ (cdr sl) tl (append cl (list (car sl)))))))
(_ (string->list s) '() '()))
(define (list-string-concat l t)
(cond
((null? l) "")
(else
(string-append (car l) t (list-string-concat (cdr l) t)))))
; returns a list of items in a but not in b
(define (list-remainder a b)
(cond
((null? a) '())
((not (list-contains (car a) b)) (cons (car a) (list-remainder (cdr a) b)))
(else (list-remainder (cdr a) b))))
(define (which-element k l n)
(cond
((null? l) #f)
((eq? (car l) k) n)
(else (which-element k (cdr l) (+ n 1)))))

3028
plant-eyelids/log.txt Normal file

File diff suppressed because it is too large Load diff

543
plant-eyelids/logic.ss Normal file
View file

@ -0,0 +1,543 @@
#lang scheme
(require scheme/class fluxus-016/fluxus "message.ss" "list-utils.ss")
(provide (all-defined-out))
(define branch-probability 6) ; as in one in branch-probability chance
(define branch-width-reduction 0.5)
(define twig-jitter 0.1)
(define branch-jitter 0.5)
(define max-twig-points 30)
(define start-twig-dist 0.05)
(define start-twig-width 0.2)
(define default-max-twigs 10)
(define default-scale-factor 1.05)
(define num-pickups 10)
(define pickup-dist-radius 200)
(define pickup-size 1)
(define ornament-grow-probability 4)
(define curl-amount 40)
(define start-size 50)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; the base class logic object - all logic side objects can
; send messages to the render side at any time by calling add-message
; this takes care of the propagation of information. (not just oo fetish, I hope)
(define game-logic-object%
(class object%
(field
(messages '())
(children '()))
(define/public (send-message name data)
(set! messages (append messages (list (make-object message% name data)))))
; convert a list of lists in to just a single list - needed to convert
; the update lists into one big list of messages
(define (flatten l)
(cond
((null? l) '())
((list? (car l)) (append (flatten (car l)) (flatten (cdr l))))
(else (cons (car l) (flatten (cdr l))))))
(define/pubment (update) ; need to augement this if we have child logic objects,
(let ((m messages)) ; and call update on them too.
(set! messages '())
(append
m
(flatten (inner '() update))))) ; the augmented method gets called here
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; a twig, which can contain other twigs things.
; (roots and shoots are both twigs)
(define twig-logic%
(class game-logic-object%
(init-field
(last-point (vector 0 0 0))
(id #f) ; our id (for matching up with the renderer geometry)
(plant #f) ; the plant we belong to
(type 'root) ; or 'shoot
(dir (vector 0 1 0)) ; the general direction we are pointing in
(width 0) ; the width of this root
(num-points max-twig-points) ; number of points in this twig
(render-type 'extruded) ; the way to tell the view to render this twig
(dist start-twig-dist) ; distance between points
(parent-twig-id -1)
(parent-twig-point-index -1))
(field
(points '()) ; the 3d points for this twig
(widths '())
(twigs '()) ; children are stored with the point number they are connected to.
(ornaments '()) ; the things attached to this twig, an assoc list with point index
(w 0) ; the width of this segment
(curl (vmul (crndvec) curl-amount))) ; the angles to turn each point, if curly
(inherit send-message)
(define/public (get-id)
id)
(define/public (set-id! s)
(set! id s))
(define/public (get-type)
type)
(define/public (get-dist)
dist)
(define/public (get-dir)
dir)
(define/public (get-width)
width)
(define/public (get-num-points)
num-points)
(define/public (get-render-type)
render-type)
(define/public (get-point point-index)
(list-ref points point-index))
(define/public (get-length)
(length points))
(define/public (get-end-pos)
(if (not (null? points))
(list-ref points (- (get-length) 1))
#f))
(define/public (growing?)
(< (length points) num-points))
(define/public (scale a)
(set! width (* width a))
(set! dist (* dist a)))
(define/public (grow pos)
(when (growing?)
(let ((new-point (if (zero? (length points))
; first point should be at edge of the seed if we are a branch
(if (eq? parent-twig-id -1) pos
last-point)
pos)))
(set! w (* width (- 1 (/ (length points) num-points))))
(set! last-point new-point)
(set! points (append points (list new-point)))
(set! widths (append widths (list w)))
(send-message 'add-twig-point (list
(list 'plant-id (send plant get-id))
(list 'twig-id id)
(list 'point new-point)
(list 'width w))))
#;(for-each
(lambda (twig)
(send (cadr twig) grow ndir))
twigs)))
(define/public (get-desc-list)
(list
(list 'plant-id (send plant get-id))
(list 'parent-twig-id parent-twig-id)
(list 'point-index parent-twig-point-index)
(list 'twig-id id)
(list 'type type)
(list 'dir dir)
(list 'width width)
(list 'num-points num-points)
(list 'render-type render-type)))
(define/public (add-twig point-index dir)
(let ((twig (make-object twig-logic%
(get-point point-index)
(send plant get-next-twig-id)
plant
type
dir
(list-ref widths point-index)
(quotient num-points 2)
render-type
dist
id
point-index
)))
(send-message 'new-twig (send twig get-desc-list))
(set! twigs (cons (list point-index twig) twigs))
twig))
(define/public (serialise)
(append
(list (make-object message% 'new-twig (get-desc-list)))
(append (map
(lambda (point width)
(make-object message% 'twig-grow (list
(list 'plant-id (send plant get-id))
(list 'twig-id id)
(list 'point point)
(list 'width width))))
points widths))
(append
(map
(lambda (twig)
(send (cadr twig) serialise))
twigs))))
(define/public (get-twig point-index)
(cadr (assq point-index twigs)))
(define/public (get-random-twig)
(if (or (null? twigs) (zero? (random 10)))
this
(send (cadr (choose twigs)) get-random-twig)))
(define/public (add-ornament point-index ornament)
; todo - check max ornaments
(send-message 'new-ornament
(list
(list 'plant-id (send plant get-id))
(list 'twig-id id)
(list 'point-index point-index)
(list 'property (send ornament get-property))))
(set! ornaments (cons (list point-index ornament) ornaments)))
(define/public (get-ornament point-index)
(cadr (assq point-index ornaments)))
; adds the ornament if it's close, and checks sub-twigs
; returns true if it's succeded
(define/public (check-pickup pickup)
; check each point in our twig
(let* ((i -1) (found (foldl
(lambda (point found)
(set! i (+ i 1))
; if we havent found anything yet and it's intersecting
(cond ((and (not found) (< (vdist point (send pickup get-pos))
(+ width (send pickup get-size))))
(send plant add-property (send pickup get-type))
(send pickup pick-up) ; this will remove the pickup for us
(send-message 'pick-up-pickup
(list
(list 'pickup-id (send pickup get-id))))
#t)
(else #f)))
#f
points)))
; now check each sub-twig
(if (not found)
(foldl
(lambda (twig found)
(if (not found)
(send (cadr twig) check-pickup pickup)
#f))
#f
twigs)
found)))
(define/augment (update)
(append
(map
(lambda (ornament)
(send (cadr ornament) update))
ornaments)
(map
(lambda (twig)
(send (cadr twig) update))
twigs)))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; abilities live on twigs, and can do things.
; this is the base class for all abilities.
(define ornament-logic%
(class game-logic-object%
(init-field
(id -1)
(property 'none)
(plant #f) ; the plant we belong to
(twig #f) ; the twig we are on
(point-index -1)) ; the index to the point on our twig
(field
(pos (send twig get-point point-index))) ; figure out the position here
(define/public (get-property)
property)
(define/public (get-pos)
pos)
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; pickups map to abilities, and live out in space
; this is the base class for all pickups.
(define pickup-logic%
(class game-logic-object%
(init-field
(id -1)
(type 'none)
(pos (vector 0 0 0)))
(field
(size pickup-size)
(picked-up #f))
(define/public (picked-up?)
picked-up)
(define/public (pick-up)
(set! picked-up #t))
(define/public (get-id)
id)
(define/public (get-type)
type)
(define/public (get-pos)
pos)
(define/public (get-size)
size)
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define plant-logic%
(class game-logic-object%
(init-field
(id #f)
(pos (vector 0 0 0))
(col (vector 1 1 1))
(tex "fff"))
(field
(twigs '()) ; a assoc list map of ids to twigs
(leader-twig #f) ; the temporary twig controlled by the player
(properties '()) ; a list of symbols - properties come from pickups
(ornaments '()) ; map of ids to ornaments on the plant
(size start-size) ; the age of this plant
(max-twigs default-max-twigs) ; the maximum twigs allowed at any time - oldest removed first
(next-twig-id 0)
(next-ornament-id 0)
(grow-amount default-scale-factor))
(inherit send-message)
(define/public (get-id)
id)
(define/public (get-pos)
pos)
(define/public (get-size)
size)
(define/public (get-col)
col)
(define/public (get-tex)
tex)
(define/public (grow pos)
(when leader-twig
(send leader-twig grow pos)
(when (not (send leader-twig growing?))
(send-message 'start-growing (list
(list 'plant-id id)
(list 'twig-id (send leader-twig get-id))))
(set! leader-twig #f))))
(define/public (add-property name)
(set! properties (cons name properties)))
; we need to maintain our list of twig ids here, for this plant
(define/public (get-next-twig-id)
(let ((id next-twig-id))
(set! next-twig-id (+ next-twig-id 1))
next-twig-id))
; we need to maintain our list of ornament ids here, for this plant
(define/public (get-next-ornament-id)
(let ((id next-ornament-id))
(set! next-ornament-id (+ next-ornament-id 1))
next-ornament-id))
(define/public (check-pickup pickup)
(foldl
(lambda (twig found)
(if (not found)
(send twig check-pickup pickup)
#f))
#f
twigs))
(define/public (destroy-twig twig)
(send-message 'destroy-branch-twig (list
(list 'plant-id id)
(list 'twig-id (send twig get-id))
)))
; a util to keep a fixed size list of twigs, calling destroy twig when needed.
(define (cons-twig thing in count out)
(cond
((null? in)
(cons thing out))
((zero? count)
(destroy-twig (car in))
(cons thing out))
(else (cons-twig thing (cdr in) (- count 1) (append out (list (car in)))))))
(define/public (add-twig twig)
(send twig set-id! (get-next-twig-id))
(set! size (* size grow-amount))
(send twig scale size)
(set! leader-twig twig)
(send-message 'grow-seed (list
(list 'plant-id id)
(list 'amount grow-amount)))
(send-message 'new-twig (send twig get-desc-list))
(set! twigs (cons-twig twig twigs max-twigs '())))
(define/public (add-sub-twig ptwig point-index dir)
(set! leader-twig (send ptwig add-twig point-index dir))
leader-twig)
(define/public (get-random-twig)
(if (not (null? twigs))
(send (choose twigs) get-random-twig)
#f))
(define/public (get-twig-from-dir dir)
(let ((dir (vnormalise dir)))
(cadr (foldl
(lambda (twig l)
(let ((d (vdot (vnormalise (send twig get-dir)) dir)))
(if (> d (car l))
(list d twig)
l)))
(list -99 #f)
twigs))))
(define/public (serialise)
(append (list (make-object message% 'new-plant (list
(list 'plant-id id)
(list 'pos pos)
(list 'size size))))
(append
(map
(lambda (twig)
(send twig serialise))
twigs))))
(define/augment (update)
; grow a new ornament?
(when (and (not (null? properties)) (zero? (random ornament-grow-probability)))
(let ((twig (get-random-twig)))
(when twig
(let
((property (choose properties))
(point-index (random (send twig get-length))))
(when (not (eq? property 'curly))
(send twig add-ornament point-index
(cond
((or
(eq? property 'leaf)
(eq? property 'wiggle))
(make-object ornament-logic%
(get-next-ornament-id)
property
this
twig
point-index))
(else
(error "property not understood " property)))))))))
(map
(lambda (twig)
(send twig update))
twigs))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define game-logic%
(class game-logic-object%
(field
(plants '())
(pickups '())
(player #f))
(inherit send-message)
(define/public (setup)
(for ((i (in-range 0 num-pickups)))
(add-pickup (make-object pickup-logic% i (choose (list 'leaf 'curly 'wiggle))
(vmul (srndvec) pickup-dist-radius)))))
(define/public (add-player plant)
(printf "new player plant added ~a~n" (send plant get-id))
(send-message 'player-plant (list
(list 'plant-id (send plant get-id))
(list 'pos (send plant get-pos))
(list 'size (send plant get-size))
(list 'col (send plant get-col))
(list 'tex (send plant get-tex))))
(set! player plant)
(set! plants (cons plant plants)))
(define/public (add-plant plant)
(send-message 'new-plant (list
(list 'plant-id (send plant get-id))
(list 'pos (send plant get-pos))
(list 'size (send plant get-size))
(list 'col (send plant get-col))
(list 'tex (send plant get-tex))))
(set! plants (cons plant plants)))
(define/public (add-pickup pickup)
(send-message 'new-pickup
(list
(list 'pickup-id (send pickup get-id))
(list 'type (send pickup get-type))
(list 'pos (send pickup get-pos))))
(set! pickups (cons pickup pickups)))
(define/public (serialise)
(send player serialise))
; todo - distribute the checking of stuff like
; this to a random selection of pickups/plants
; to distribute the cpu load
(define/augment (update)
(for-each
(lambda (pickup)
(for-each
(lambda (plant)
(send plant check-pickup pickup))
plants))
pickups)
; remove the pickups that have been 'picked up'
(set! pickups (filter
(lambda (pickup)
(not (send pickup picked-up?)))
pickups))
(map
(lambda (plant)
(send plant update))
plants))
(super-new)))

View file

@ -0,0 +1,12 @@
# Blender3D MTL File:
# Material Count: 1
newmtl (null)
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

View file

@ -0,0 +1,756 @@
# Blender3D v245 OBJ File:
# www.blender3d.org
mtllib fork.mtl
o Fork_None_(null)
v -0.039791 0.168513 4.964270
v -0.040933 0.282689 4.925990
v -0.108653 0.718406 6.748458
v 0.465093 0.110662 -4.535414
v 0.244420 0.119588 -4.767383
v 0.351705 0.156405 -3.763552
v 0.565785 0.215406 -3.107401
v 0.576558 0.079835 -3.220147
v 0.539070 0.119381 -4.622900
v 0.224510 0.359067 -1.998777
v -0.495336 0.179528 -3.253911
v 0.482312 0.206201 -3.048592
v 0.333694 0.090661 -5.127208
v -0.104077 0.091664 -5.361515
v -0.362328 0.141538 -3.919894
v -0.155120 0.113817 -4.893561
v -0.259453 0.100733 -5.136386
v -0.177594 0.719197 6.727843
v -0.235328 0.278192 4.912725
v -0.228743 0.167002 4.960428
v -0.425034 -0.007686 -5.027839
v 0.475817 -0.007705 -4.939786
v -0.593166 0.040013 -3.580553
v -0.324651 0.159689 4.934551
v -0.557443 0.156443 4.918820
v 0.042170 0.158826 4.939285
v -0.285410 0.263076 3.259415
v -0.216526 0.439434 2.300539
v -0.323724 0.116550 3.345688
v -0.519393 0.169678 4.133279
v -0.522179 0.046173 4.142149
v 0.453852 0.716404 6.734918
v 0.564047 0.140050 4.858176
v 0.566938 0.238374 4.716423
v 0.111910 0.718545 6.747885
v 0.231461 0.164695 4.953304
v 0.180681 0.719077 6.727861
v -0.383279 0.722443 6.751919
v -0.450716 0.716423 6.734745
v 0.386434 0.722560 6.752130
v 0.322608 0.162264 4.938189
v 0.479647 0.034778 3.952436
v 0.036678 0.277110 4.912676
v 0.236135 0.278995 4.912978
v -0.548701 0.123531 -4.501585
v 0.305012 0.602722 -0.161291
v 0.001636 -0.017819 -5.413282
v 0.102475 0.104668 -5.380585
v -0.390422 0.097412 -5.076557
v -0.234725 0.355297 -2.034723
v 0.451462 0.167179 3.831276
v 0.095946 0.653445 1.798241
v -0.128993 0.662375 1.734646
v 0.226843 0.551683 2.327707
v -0.565709 0.215877 -3.105098
v -0.325673 0.563432 -0.527512
v -0.227065 0.523558 2.442820
v -0.286605 0.692038 1.206266
v 0.258805 0.211437 3.022681
v 0.308389 0.575386 0.876130
v 0.285810 0.689437 1.255805
v 0.233941 0.485339 2.056813
v -0.335285 0.575966 0.516886
v 0.220081 0.676948 1.021054
v 0.390437 0.605372 -0.286421
v -0.329970 0.284389 4.942448
v -0.555328 0.274841 4.893444
v 0.276326 0.296874 3.159481
v 0.333532 0.282617 4.928764
v -0.359108 0.645322 0.090503
vt 0.473081 0.146963 0.0
vt 0.472105 0.150109 0.0
vt 0.414211 0.000302 0.0
vt 0.904708 0.927839 0.0
vt 0.716055 0.946907 0.0
vt 0.807773 0.864392 0.0
vt 0.990790 0.810456 0.0
vt 1.000000 0.819724 0.0
vt 0.967952 0.935030 0.0
vt 0.699033 0.719327 0.0
vt 0.083636 0.822499 0.0
vt 0.919429 0.805622 0.0
vt 0.792376 0.976485 0.0
vt 0.418124 0.995745 0.0
vt 0.904708 0.927839 0.0
vt 0.197345 0.877243 0.0
vt 0.374487 0.957279 0.0
vt 0.285292 0.977239 0.0
vt 0.355273 0.001996 0.0
vt 0.305916 0.151200 0.0
vt 0.311546 0.147278 0.0
vt 0.143737 0.968316 0.0
vt 0.913877 0.961079 0.0
vt 0.000000 0.849349 0.0
vt 0.229554 0.149405 0.0
vt 0.030540 0.150699 0.0
vt 0.543150 0.149016 0.0
vt 0.716055 0.946907 0.0
vt 0.374487 0.957279 0.0
vt 0.197345 0.877243 0.0
vt 0.263101 0.287102 0.0
vt 0.321990 0.365922 0.0
vt 0.230347 0.280010 0.0
vt 0.355273 0.001996 0.0
vt 0.472105 0.150109 0.0
vt 0.305916 0.151200 0.0
vt 0.919429 0.805622 0.0
vt 0.807773 0.864392 0.0
vt 0.699033 0.719327 0.0
vt 0.030540 0.150699 0.0
vt 0.063069 0.215270 0.0
vt 0.060687 0.214541 0.0
vt 0.263101 0.287102 0.0
vt 0.230347 0.280010 0.0
vt 0.063069 0.215270 0.0
vt 0.895098 0.001415 0.0
vt 0.989304 0.155683 0.0
vt 0.991775 0.167336 0.0
vt 0.602771 0.000349 0.0
vt 0.704975 0.147864 0.0
vt 0.661564 0.001995 0.0
vt 0.030540 0.150699 0.0
vt 0.179433 0.000017 0.0
vt 0.121781 0.001429 0.0
vt 0.989304 0.155683 0.0
vt 0.837462 0.000000 0.0
vt 0.782897 0.149106 0.0
vt 0.991775 0.167336 0.0
vt 0.989304 0.155683 0.0
vt 0.917150 0.230136 0.0
vt 0.538454 0.151204 0.0
vt 0.708971 0.151179 0.0
vt 0.991775 0.167336 0.0
vt 0.418124 0.995745 0.0
vt 0.285292 0.977239 0.0
vt 0.904708 0.927839 0.0
vt 0.038014 0.925058 0.0
vt 0.143737 0.968316 0.0
vt 0.000000 0.849349 0.0
vt 0.767855 0.568285 0.0
vt 0.990790 0.810456 0.0
vt 0.919429 0.805622 0.0
vt 0.374487 0.957279 0.0
vt 0.904708 0.927839 0.0
vt 0.285292 0.977239 0.0
vt 0.508498 1.000000 0.0
vt 0.418124 0.995745 0.0
vt 0.594705 0.997312 0.0
vt 0.038014 0.925058 0.0
vt 0.083636 0.822499 0.0
vt 0.173327 0.972321 0.0
vt 0.197345 0.877243 0.0
vt 0.807773 0.864392 0.0
vt 0.716055 0.946907 0.0
vt 0.306432 0.722282 0.0
vt 0.807773 0.864392 0.0
vt 0.197345 0.877243 0.0
vt 0.472105 0.150109 0.0
vt 0.991775 0.167336 0.0
vt 0.063069 0.215270 0.0
vt 0.917150 0.230136 0.0
vt 0.893055 0.240095 0.0
vt 0.991775 0.167336 0.0
vt 0.589123 0.407211 0.0
vt 0.396822 0.412439 0.0
vt 0.701028 0.363689 0.0
vt 0.543150 0.149016 0.0
vt 0.311546 0.147278 0.0
vt 0.229554 0.149405 0.0
vt 0.023473 0.810267 0.0
vt 0.228681 0.598388 0.0
vt 0.083636 0.822499 0.0
vt 0.321990 0.365922 0.0
vt 0.312980 0.354226 0.0
vt 0.262080 0.455871 0.0
vt 0.893055 0.240095 0.0
vt 0.917150 0.230136 0.0
vt 0.728352 0.306562 0.0
vt 0.173327 0.972321 0.0
vt 0.083636 0.822499 0.0
vt 0.285292 0.977239 0.0
vt 0.770742 0.483009 0.0
vt 0.751439 0.451799 0.0
vt 0.707096 0.385956 0.0
vt 0.418124 0.995745 0.0
vt 0.173327 0.972321 0.0
vt 0.285292 0.977239 0.0
vt 0.770742 0.483009 0.0
vt 0.220463 0.512539 0.0
vt 0.751439 0.451799 0.0
vt 0.967952 0.935030 0.0
vt 1.000000 0.819724 0.0
vt 0.913877 0.961079 0.0
vt 0.767855 0.568285 0.0
vt 0.695246 0.471096 0.0
vt 0.751439 0.451799 0.0
vt 0.538454 0.151204 0.0
vt 0.473081 0.146963 0.0
vt 0.543150 0.149016 0.0
vt 0.083636 0.822499 0.0
vt 0.306432 0.722282 0.0
vt 0.197345 0.877243 0.0
vt 0.143737 0.968316 0.0
vt 0.173327 0.972321 0.0
vt 0.418124 0.995745 0.0
vt 0.143737 0.968316 0.0
vt 0.418124 0.995745 0.0
vt 0.508498 1.000000 0.0
vt 0.538454 0.151204 0.0
vt 0.661564 0.001995 0.0
vt 0.708971 0.151179 0.0
vt 0.767855 0.568285 0.0
vt 0.751439 0.451799 0.0
vt 0.840885 0.578571 0.0
vt 0.919429 0.805622 0.0
vt 0.904708 0.927839 0.0
vt 0.807773 0.864392 0.0
vt 0.321990 0.365922 0.0
vt 0.707096 0.385956 0.0
vt 0.728352 0.306562 0.0
vt 0.602771 0.000349 0.0
vt 0.661564 0.001995 0.0
vt 0.538454 0.151204 0.0
vt 0.000000 0.849349 0.0
vt 0.913877 0.961079 0.0
vt 1.000000 0.819724 0.0
vt 0.179433 0.000017 0.0
vt 0.225007 0.148756 0.0
vt 0.032348 0.152784 0.0
vt 0.472105 0.150109 0.0
vt 0.473081 0.146963 0.0
vt 0.538454 0.151204 0.0
vt 0.990790 0.810456 0.0
vt 0.967952 0.935030 0.0
vt 0.904708 0.927839 0.0
vt 0.751439 0.451799 0.0
vt 0.220463 0.512539 0.0
vt 0.000000 0.849349 0.0
vt 0.220463 0.512539 0.0
vt 0.770742 0.483009 0.0
vt 0.321990 0.365922 0.0
vt 0.704975 0.147864 0.0
vt 0.602771 0.000349 0.0
vt 0.543150 0.149016 0.0
vt 0.707096 0.385956 0.0
vt 0.701028 0.363689 0.0
vt 0.728352 0.306562 0.0
vt 0.989304 0.155683 0.0
vt 0.895098 0.001415 0.0
vt 0.837462 0.000000 0.0
vt 0.355273 0.001996 0.0
vt 0.414211 0.000302 0.0
vt 0.472105 0.150109 0.0
vt 0.038014 0.925058 0.0
vt 0.023473 0.810267 0.0
vt 0.083636 0.822499 0.0
vt 0.038014 0.925058 0.0
vt 0.173327 0.972321 0.0
vt 0.143737 0.968316 0.0
vt 0.229554 0.149405 0.0
vt 0.311546 0.147278 0.0
vt 0.305916 0.151200 0.0
vt 0.589123 0.407211 0.0
vt 0.751439 0.451799 0.0
vt 0.695246 0.471096 0.0
vt 0.893055 0.240095 0.0
vt 0.728352 0.306562 0.0
vt 0.743330 0.295317 0.0
vt 0.695246 0.471096 0.0
vt 0.396822 0.412439 0.0
vt 0.589123 0.407211 0.0
vt 0.589123 0.407211 0.0
vt 0.701028 0.363689 0.0
vt 0.751439 0.451799 0.0
vt 0.030540 0.150699 0.0
vt 0.229554 0.149405 0.0
vt 0.179433 0.000017 0.0
vt 0.263101 0.287102 0.0
vt 0.743330 0.295317 0.0
vt 0.312980 0.354226 0.0
vt 0.807773 0.864392 0.0
vt 0.306432 0.722282 0.0
vt 0.699033 0.719327 0.0
vt 0.225007 0.148756 0.0
vt 0.229554 0.149405 0.0
vt 0.305916 0.151200 0.0
vt 0.743330 0.295317 0.0
vt 0.728352 0.306562 0.0
vt 0.701028 0.363689 0.0
vt 0.543150 0.149016 0.0
vt 0.473081 0.146963 0.0
vt 0.311546 0.147278 0.0
vt 0.472105 0.150109 0.0
vt 0.538454 0.151204 0.0
vt 0.991775 0.167336 0.0
vt 0.913877 0.961079 0.0
vt 0.143737 0.968316 0.0
vt 0.508498 1.000000 0.0
vt 0.661564 0.001995 0.0
vt 0.704975 0.147864 0.0
vt 0.708971 0.151179 0.0
vt 0.792236 0.149881 0.0
vt 0.991775 0.167336 0.0
vt 0.708971 0.151179 0.0
vt 0.728352 0.306562 0.0
vt 0.230347 0.280010 0.0
vt 0.321990 0.365922 0.0
vt 0.990790 0.810456 0.0
vt 0.767855 0.568285 0.0
vt 0.840885 0.578571 0.0
vt 0.225007 0.148756 0.0
vt 0.472105 0.150109 0.0
vt 0.063069 0.215270 0.0
vt 0.311546 0.147278 0.0
vt 0.473081 0.146963 0.0
vt 0.414211 0.000302 0.0
vt 0.060687 0.214541 0.0
vt 0.989304 0.155683 0.0
vt 0.543150 0.149016 0.0
vt 0.312980 0.354226 0.0
vt 0.396822 0.412439 0.0
vt 0.262080 0.455871 0.0
vt 0.751439 0.451799 0.0
vt 0.000000 0.849349 0.0
vt 1.000000 0.819724 0.0
vt 0.893055 0.240095 0.0
vt 0.263101 0.287102 0.0
vt 0.063069 0.215270 0.0
vt 0.263101 0.287102 0.0
vt 0.893055 0.240095 0.0
vt 0.743330 0.295317 0.0
vt 0.262080 0.455871 0.0
vt 0.396822 0.412439 0.0
vt 0.200096 0.547587 0.0
vt 0.708971 0.151179 0.0
vt 0.704975 0.147864 0.0
vt 0.782897 0.149106 0.0
vt 0.220463 0.512539 0.0
vt 0.262080 0.455871 0.0
vt 0.200096 0.547587 0.0
vt 0.782897 0.149106 0.0
vt 0.837462 0.000000 0.0
vt 0.792236 0.149881 0.0
vt 0.782897 0.149106 0.0
vt 0.543150 0.149016 0.0
vt 0.989304 0.155683 0.0
vt 0.743330 0.295317 0.0
vt 0.701028 0.363689 0.0
vt 0.312980 0.354226 0.0
vt 0.312980 0.354226 0.0
vt 0.321990 0.365922 0.0
vt 0.263101 0.287102 0.0
vt 0.990790 0.810456 0.0
vt 0.904708 0.927839 0.0
vt 0.919429 0.805622 0.0
vt 0.701028 0.363689 0.0
vt 0.707096 0.385956 0.0
vt 0.751439 0.451799 0.0
vt 0.472105 0.150109 0.0
vt 0.225007 0.148756 0.0
vt 0.305916 0.151200 0.0
vt 0.225007 0.148756 0.0
vt 0.179433 0.000017 0.0
vt 0.229554 0.149405 0.0
vt 0.792376 0.976485 0.0
vt 0.913877 0.961079 0.0
vt 0.508498 1.000000 0.0
vt 0.792376 0.976485 0.0
vt 0.508498 1.000000 0.0
vt 0.594705 0.997312 0.0
vt 0.312980 0.354226 0.0
vt 0.701028 0.363689 0.0
vt 0.396822 0.412439 0.0
vt 0.919429 0.805622 0.0
vt 0.228681 0.598388 0.0
vt 0.767855 0.568285 0.0
vt 0.904708 0.927839 0.0
vt 0.374487 0.957279 0.0
vt 0.716055 0.946907 0.0
vt 0.023473 0.810267 0.0
vt 0.200096 0.547587 0.0
vt 0.228681 0.598388 0.0
vt 0.230347 0.280010 0.0
vt 0.917150 0.230136 0.0
vt 0.060687 0.214541 0.0
vt 0.543150 0.149016 0.0
vt 0.782897 0.149106 0.0
vt 0.704975 0.147864 0.0
vt 0.767855 0.568285 0.0
vt 0.200096 0.547587 0.0
vt 0.695246 0.471096 0.0
vt 0.594705 0.997312 0.0
vt 0.418124 0.995745 0.0
vt 0.792376 0.976485 0.0
vt 0.063069 0.215270 0.0
vt 0.030540 0.150699 0.0
vt 0.032348 0.152784 0.0
vt 0.200096 0.547587 0.0
vt 0.023473 0.810267 0.0
vt 0.000000 0.849349 0.0
vt 0.917150 0.230136 0.0
vt 0.230347 0.280010 0.0
vt 0.728352 0.306562 0.0
vt 0.414211 0.000302 0.0
vt 0.355273 0.001996 0.0
vt 0.311546 0.147278 0.0
vt 0.060687 0.214541 0.0
vt 0.917150 0.230136 0.0
vt 0.989304 0.155683 0.0
vt 0.893055 0.240095 0.0
vt 0.063069 0.215270 0.0
vt 0.991775 0.167336 0.0
vt 0.200096 0.547587 0.0
vt 0.767855 0.568285 0.0
vt 0.228681 0.598388 0.0
vt 0.792376 0.976485 0.0
vt 0.967952 0.935030 0.0
vt 0.913877 0.961079 0.0
vt 0.179433 0.000017 0.0
vt 0.032348 0.152784 0.0
vt 0.121781 0.001429 0.0
vt 0.708971 0.151179 0.0
vt 0.782897 0.149106 0.0
vt 0.792236 0.149881 0.0
vt 0.228681 0.598388 0.0
vt 0.919429 0.805622 0.0
vt 0.083636 0.822499 0.0
vt 0.837462 0.000000 0.0
vt 0.895098 0.001415 0.0
vt 0.991775 0.167336 0.0
vt 0.770742 0.483009 0.0
vt 0.707096 0.385956 0.0
vt 0.321990 0.365922 0.0
vt 0.262080 0.455871 0.0
vt 0.220463 0.512539 0.0
vt 0.321990 0.365922 0.0
vt 0.840885 0.578571 0.0
vt 1.000000 0.819724 0.0
vt 0.990790 0.810456 0.0
vt 0.023473 0.810267 0.0
vt 0.038014 0.925058 0.0
vt 0.000000 0.849349 0.0
vt 0.285292 0.977239 0.0
vt 0.083636 0.822499 0.0
vt 0.197345 0.877243 0.0
vt 0.032348 0.152784 0.0
vt 0.225007 0.148756 0.0
vt 0.063069 0.215270 0.0
vt 0.220463 0.512539 0.0
vt 0.200096 0.547587 0.0
vt 0.000000 0.849349 0.0
vt 0.543150 0.149016 0.0
vt 0.602771 0.000349 0.0
vt 0.538454 0.151204 0.0
vt 0.396822 0.412439 0.0
vt 0.695246 0.471096 0.0
vt 0.200096 0.547587 0.0
vt 0.060687 0.214541 0.0
vt 0.543150 0.149016 0.0
vt 0.030540 0.150699 0.0
vt 0.230347 0.280010 0.0
vt 0.060687 0.214541 0.0
vt 0.063069 0.215270 0.0
vt 0.030540 0.150699 0.0
vt 0.121781 0.001429 0.0
vt 0.032348 0.152784 0.0
vt 0.792376 0.976485 0.0
vt 0.904708 0.927839 0.0
vt 0.967952 0.935030 0.0
vt 1.000000 0.819724 0.0
vt 0.840885 0.578571 0.0
vt 0.751439 0.451799 0.0
vt 0.699033 0.719327 0.0
vt 0.306432 0.722282 0.0
vt 0.083636 0.822499 0.0
vt 0.837462 0.000000 0.0
vt 0.991775 0.167336 0.0
vt 0.792236 0.149881 0.0
vn 0.999267 0.020780 0.032163
vn 0.088560 0.995010 -0.045958
vn 0.994818 0.098847 -0.023799
vn -0.003103 -0.989668 0.143346
vn 0.023105 0.998976 -0.038893
vn -0.039495 0.998541 -0.036834
vn -0.998277 -0.041207 0.041764
vn -0.003204 -0.999464 0.032568
vn -0.005942 -0.958312 0.285660
vn -0.005107 0.999550 -0.029545
vn -0.970770 0.238615 -0.025852
vn -0.006384 0.971757 -0.235897
vn 0.173783 0.979696 -0.099980
vn -0.998663 0.019074 -0.048051
vn -0.963246 0.106728 -0.246508
vn 0.998169 0.038222 0.046870
vn 0.094489 -0.949462 0.299321
vn 0.010417 -0.955717 0.294104
vn 0.009782 -0.955510 0.294797
vn 0.987450 -0.138486 -0.075918
vn -0.008897 0.976194 -0.216716
vn 0.012528 0.999422 -0.031616
vn -0.873315 -0.479568 -0.085648
vn -0.209244 0.966956 -0.145644
vn 0.047960 0.996084 -0.074278
vn -0.107609 0.338160 -0.934916
vn 0.001715 0.998990 -0.044909
vn -0.013088 0.999293 -0.035252
vn 0.004040 0.993594 -0.112937
vn 0.019427 0.988098 -0.152591
vn 0.987018 0.085950 -0.135679
vn -0.015444 0.981195 0.192402
vn -0.006026 -0.956228 0.292562
vn 0.187707 0.970950 -0.148401
vn -0.985873 -0.165633 0.024902
vn 0.972691 -0.005283 -0.232044
vn -0.047073 0.997754 -0.047661
vn 0.998018 -0.009498 0.062206
vn -0.063556 0.994443 -0.083926
vn 0.154768 0.948682 -0.275771
vn 0.927011 -0.373369 -0.035300
vn 0.027168 0.997787 -0.060688
vn 0.308241 0.222390 0.924949
vn -0.205228 0.973941 -0.096544
vn -0.703151 -0.095070 -0.704656
vn -0.645511 -0.289010 -0.706958
vn -0.008826 0.971737 -0.235901
vn -0.121937 0.990583 -0.062268
vn -0.031428 0.997472 -0.063731
vn -0.048849 -0.961245 -0.271333
vn -0.074560 0.970253 -0.230325
vn 0.018670 -0.998588 0.049740
vn 0.009921 0.971943 -0.235005
vn 0.182414 0.314186 0.931672
vn -0.185254 0.980925 -0.058888
vn 0.029018 -0.991369 0.127847
vn 0.043257 -0.995927 -0.079115
vn 0.007747 -0.955354 0.295361
vn 0.995202 0.097818 0.002120
vn -0.012524 -0.956068 0.292877
vn 0.079614 0.970168 -0.228990
vn 0.360039 0.931183 -0.057192
vn -0.944982 0.186694 -0.268617
vn -0.268325 0.366344 0.890951
vn -0.186431 0.982468 -0.000066
vn 0.962728 0.156166 -0.220833
vn 0.029773 0.998945 0.034965
vn 0.204273 0.969445 0.135824
vn -0.006655 -0.955290 0.295594
vn -0.003298 0.952767 0.303684
vn 0.000771 0.993477 -0.114032
vn 0.296436 -0.047765 0.953858
vn 0.993974 -0.073234 -0.081567
vn 0.000102 -0.932250 0.361815
vn 0.070696 0.997481 -0.005865
vn -0.002337 -0.999717 0.023694
vn 0.998922 -0.027711 0.037241
vn -0.002841 0.978343 -0.206968
vn -0.008522 -0.955163 -0.295958
vn -0.246090 0.957924 -0.147718
vn -0.002140 0.990168 -0.139869
vn 0.001656 -0.955622 0.294590
vn -0.012484 -0.988822 0.148580
vn -0.301867 0.942571 0.142959
vn -0.007694 -0.990890 0.134454
vn 0.038780 0.992439 0.116454
vn -0.024193 0.980390 0.195578
vn 0.386503 0.920090 -0.063638
vn 0.163234 0.322308 0.932455
vn -0.997030 0.044397 0.062929
vn -0.995833 0.090933 0.006952
vn 0.012866 -0.952793 0.303349
vn 0.014819 0.956282 0.292070
vn -0.997387 -0.002879 -0.072181
vn -0.152196 0.986427 -0.061622
vn 0.996031 -0.076843 0.044918
vn 0.007128 -0.974147 0.225803
vn 0.998955 0.041379 0.019413
vn 0.676959 -0.301350 -0.671502
vn 0.671506 -0.383584 -0.633990
vn -0.012461 0.981573 0.190683
vn 0.016691 0.990701 -0.135031
vn 0.037886 -0.996510 -0.074387
vn -0.015709 0.991102 -0.132175
vn -0.029353 -0.995022 -0.095236
vn 0.012832 -0.972210 0.233757
vn 0.041363 0.997362 -0.059642
vn -0.053001 0.993240 0.103276
vn -0.998807 0.007498 -0.048253
vn -0.997230 -0.029227 0.068400
vn 0.049766 -0.978972 -0.197831
vn -0.100411 -0.948844 0.299354
vn 0.010381 -0.993370 0.114490
vn -0.021501 0.996771 -0.077368
vn 0.014075 0.991336 -0.130594
vn 0.800863 0.483258 -0.353667
vn -0.027819 0.972408 -0.231623
vn -0.162645 0.091690 0.982415
vn 0.002297 0.990209 -0.139574
vn 0.030448 0.973014 -0.228728
vn 0.062498 -0.995446 -0.071978
vn -0.997572 0.016422 0.067677
vn 0.997843 0.031313 0.057696
vn -0.974163 0.224264 -0.026695
vn 0.199927 0.979681 -0.015955
vn -0.012045 0.990417 -0.137585
vn -0.997929 0.024021 0.059665
vn -0.998158 -0.035235 0.049394
vn -0.048888 0.998798 -0.003517
vn -0.000863 -0.990076 0.140530
vn -0.970416 0.004551 -0.241397
vn -0.998348 0.028523 0.049880
vn -0.124038 0.992259 -0.005995
vn 0.996957 -0.035197 0.069554
vn -0.003096 -0.989668 0.143342
vn -0.028361 0.971900 -0.233678
usemtl (null)
s off
f 1/1/1 2/2/1 3/3/1
f 4/4/2 5/5/2 6/6/2
f 7/7/3 8/8/3 9/9/3
f 10/10/4 11/11/4 12/12/4
f 13/13/5 14/14/5 4/15/5
f 15/16/6 16/17/6 17/18/6
f 18/19/7 19/20/7 20/21/7
f 21/22/8 22/23/8 23/24/8
f 24/25/9 25/26/9 26/27/9
f 5/28/10 16/29/10 15/30/10
f 27/31/11 28/32/11 29/33/11
f 18/34/12 2/35/12 19/36/12
f 12/37/13 6/38/13 10/39/13
f 25/40/14 30/41/14 31/42/14
f 27/43/15 29/44/15 30/45/15
f 32/46/16 33/47/16 34/48/16
f 35/49/17 36/50/17 37/51/17
f 25/52/18 38/53/18 39/54/18
f 33/55/19 40/56/19 41/57/19
f 34/58/20 33/59/20 42/60/20
f 43/61/21 44/62/21 34/63/21
f 14/64/22 17/65/22 4/66/22
f 45/67/23 21/68/23 23/69/23
f 46/70/24 7/71/24 12/72/24
f 16/73/25 4/74/25 17/75/25
f 47/76/26 14/77/26 48/78/26
f 45/79/27 11/80/27 49/81/27
f 15/82/28 6/83/28 5/84/28
f 50/85/29 6/86/29 15/87/29
f 2/88/30 34/89/30 30/90/30
f 42/91/31 51/92/31 34/93/31
f 52/94/32 53/95/32 54/96/32
f 26/97/33 20/98/33 24/99/33
f 55/100/34 56/101/34 11/102/34
f 28/103/35 57/104/35 58/105/35
f 51/106/36 42/107/36 59/108/36
f 49/109/37 11/110/37 17/111/37
f 60/112/38 61/113/38 62/114/38
f 14/115/39 49/116/39 17/117/39
f 60/118/40 63/119/40 61/120/40
f 9/121/41 8/122/41 22/123/41
f 46/124/42 64/125/42 61/126/42
f 43/127/43 1/128/43 26/129/43
f 11/130/44 50/131/44 15/132/44
f 21/133/45 49/134/45 14/135/45
f 21/136/46 14/137/46 47/138/46
f 43/139/47 37/140/47 44/141/47
f 46/142/48 61/143/48 65/144/48
f 12/145/49 4/146/49 6/147/49
f 28/148/50 62/149/50 59/150/50
f 35/151/51 37/152/51 43/153/51
f 23/154/52 22/155/52 8/156/52
f 38/157/53 66/158/53 67/159/53
f 2/160/54 1/161/54 43/162/54
f 7/163/55 9/164/55 4/165/55
f 61/166/56 63/167/56 23/168/56
f 63/169/57 60/170/57 28/171/57
f 36/172/58 35/173/58 26/174/58
f 62/175/59 54/176/59 59/177/59
f 33/178/60 32/179/60 40/180/60
f 18/181/61 3/182/61 2/183/61
f 45/184/62 55/185/62 11/186/62
f 45/187/63 49/188/63 21/189/63
f 24/190/64 20/191/64 19/192/64
f 52/193/65 61/194/65 64/195/65
f 51/196/66 59/197/66 68/198/66
f 64/199/67 53/200/67 52/201/67
f 52/202/68 54/203/68 61/204/68
f 25/205/69 24/206/69 38/207/69
f 27/208/70 68/209/70 57/210/70
f 6/211/71 50/212/71 10/213/71
f 66/214/72 24/215/72 19/216/72
f 68/217/73 59/218/73 54/219/73
f 26/220/74 1/221/74 20/222/74
f 2/223/75 43/224/75 34/225/75
f 22/226/76 21/227/76 47/228/76
f 37/229/77 36/230/77 44/231/77
f 69/232/78 34/233/78 44/234/78
f 59/235/79 29/236/79 28/237/79
f 7/238/80 46/239/80 65/240/80
f 66/241/81 2/242/81 30/243/81
f 20/244/82 1/245/82 3/246/82
f 31/247/83 33/248/83 26/249/83
f 57/250/84 53/251/84 58/252/84
f 61/253/85 23/254/85 8/255/85
f 51/256/86 27/257/86 30/258/86
f 27/259/87 51/260/87 68/261/87
f 58/262/88 53/263/88 70/264/88
f 44/265/89 36/266/89 41/267/89
f 63/268/90 58/269/90 70/270/90
f 41/271/91 40/272/91 69/273/91
f 41/274/92 26/275/92 33/276/92
f 68/277/93 54/278/93 57/279/93
f 57/280/94 28/281/94 27/282/94
f 7/283/95 4/284/95 12/285/95
f 54/286/96 62/287/96 61/288/96
f 2/289/97 66/290/97 19/291/97
f 66/292/98 38/293/98 24/294/98
f 13/295/99 22/296/99 47/297/99
f 13/298/100 47/299/100 48/300/100
f 57/301/101 54/302/101 53/303/101
f 12/304/102 56/305/102 46/306/102
f 4/307/103 16/308/103 5/309/103
f 55/310/104 70/311/104 56/312/104
f 29/313/105 42/314/105 31/315/105
f 26/316/106 41/317/106 36/318/106
f 46/319/107 70/320/107 64/321/107
f 48/322/108 14/323/108 13/324/108
f 30/325/109 25/326/109 67/327/109
f 70/328/110 55/329/110 23/330/110
f 42/331/111 29/332/111 59/333/111
f 3/334/112 18/335/112 20/336/112
f 31/337/113 42/338/113 33/339/113
f 51/340/114 30/341/114 34/342/114
f 70/343/115 46/344/115 56/345/115
f 13/346/116 9/347/116 22/348/116
f 38/349/117 67/350/117 39/351/117
f 44/352/118 41/353/118 69/354/118
f 56/355/119 12/356/119 11/357/119
f 40/358/120 32/359/120 34/360/120
f 60/361/121 62/362/121 28/363/121
f 58/364/122 63/365/122 28/366/122
f 65/367/123 8/368/123 7/369/123
f 55/370/124 45/371/124 23/372/124
f 17/373/125 11/374/125 15/375/125
f 67/376/126 66/377/126 30/378/126
f 63/379/127 70/380/127 23/381/127
f 26/382/128 35/383/128 43/384/128
f 53/385/129 64/386/129 70/387/129
f 31/388/130 26/389/130 25/390/130
f 29/391/131 31/392/131 30/393/131
f 25/394/132 39/395/132 67/396/132
f 13/397/133 4/398/133 9/399/133
f 8/400/134 65/401/134 61/402/134
f 10/403/135 50/404/135 11/405/135
f 40/406/136 34/407/136 69/408/136

View file

@ -0,0 +1,582 @@
# Blender3D v245 OBJ File:
# www.blender3d.org
mtllib leaf.mtl
o Curve_Mesh
v -7.047234 0.038002 -1.022942
v -11.264242 -0.153552 0.126473
v -4.418776 -0.086798 0.940357
v -5.315497 0.031690 -0.180873
v -7.240246 -0.220995 -1.618395
v -2.182297 -0.107477 0.632439
v -3.409689 -0.261848 -1.164152
v -4.445007 -0.246134 0.098749
v -9.527756 -0.227542 0.073376
v -0.966455 -0.140352 0.344434
v -0.514914 -0.130761 -0.144194
v -10.089308 -0.177194 -0.433657
v -8.773151 -0.251968 -0.985874
v -3.055811 -0.194685 -1.287206
v -2.115076 -0.195924 -0.994632
v -9.190776 -0.068906 -0.755511
v -1.264242 -0.094703 0.354177
v -8.191332 -0.206317 -1.387834
v -11.250303 -0.169977 0.096730
v -10.460196 -0.154455 0.348469
v -10.484699 -0.122272 0.392909
v -1.583734 -0.063870 -0.253244
v -7.882478 0.002633 -0.585869
v -9.567028 -0.071077 0.596598
v -4.555383 -0.010973 -1.214781
v -3.045810 -0.036238 0.582160
v -0.045748 -0.157026 0.124692
v -7.553912 -0.149835 0.854059
v -0.734440 -0.182283 -0.330276
v -11.194538 -0.161425 0.102146
v -7.364784 -0.084432 1.008285
v -8.087549 -0.032161 0.813171
v -9.479574 -0.051819 -0.456805
v -6.223495 -0.222975 -1.687431
v -0.095529 -0.154022 0.018498
v -9.110777 -0.194869 -0.985560
v -8.507463 -0.093172 0.906505
v -5.677238 -0.021171 0.857353
v -0.423669 -0.140183 0.154590
v -6.172565 -0.000412 -1.285111
v -0.114633 -0.164471 -0.023272
v -2.054875 -0.076787 -0.785380
v -4.607953 0.010638 -0.665514
v -1.223266 -0.082933 -0.451082
v -2.492149 -0.149623 0.584484
v -7.241049 -0.005272 -1.231458
v -4.720226 -0.234150 -1.586024
v -9.795026 -0.056972 0.020161
v -6.006557 -0.104695 1.029027
v -10.433018 -0.112634 -0.172237
v -7.737690 -0.267488 -0.098576
v -6.915709 -0.282023 -1.321073
v -9.560086 -0.120422 0.710110
v -4.582968 -0.273148 -0.375462
v -1.409677 -0.211992 -0.065779
v -8.244359 -0.023822 -1.047967
v -1.304763 -0.179911 -0.652948
v -2.941688 -0.014249 -0.874392
v -7.930120 0.018277 -0.099790
v -4.630015 -0.187233 -1.576154
vt 0.073696 0.735404 0.0
vt 0.165524 0.824945 0.0
vt 0.126859 0.819596 0.0
vt 0.432079 0.152504 0.0
vt 0.468141 0.246735 0.0
vt 0.451917 0.284359 0.0
vt 0.933161 0.846644 0.0
vt 0.953640 0.666814 0.0
vt 0.966109 0.752129 0.0
vt 0.225048 0.105335 0.0
vt 0.325833 0.000000 0.0
vt 0.272563 0.074501 0.0
vt 0.723034 0.402362 0.0
vt 0.771236 0.117795 0.0
vt 0.808452 0.389397 0.0
vt 0.989735 0.209144 0.0
vt 0.993981 0.132207 0.0
vt 0.994094 0.211236 0.0
vt 0.771236 0.117795 0.0
vt 0.775996 0.001766 0.0
vt 0.844746 0.077571 0.0
vt 0.087523 0.601090 0.0
vt 0.149569 0.745541 0.0
vt 0.073696 0.735404 0.0
vt 0.491164 0.550942 0.0
vt 0.505448 0.416198 0.0
vt 0.577868 0.298306 0.0
vt 0.953640 0.666814 0.0
vt 0.981584 0.649672 0.0
vt 0.966109 0.752129 0.0
vt 0.781201 0.684506 0.0
vt 0.808452 0.389397 0.0
vt 0.953640 0.666814 0.0
vt 0.550453 0.726772 0.0
vt 0.506269 0.641901 0.0
vt 0.624017 0.778365 0.0
vt 0.199788 0.303000 0.0
vt 0.121510 0.377889 0.0
vt 0.222040 0.159944 0.0
vt 0.149569 0.745541 0.0
vt 0.226137 0.899355 0.0
vt 0.165524 0.824945 0.0
vt 0.808452 0.389397 0.0
vt 0.891904 0.213888 0.0
vt 0.981611 0.528022 0.0
vt 0.165524 0.824945 0.0
vt 0.188960 0.892098 0.0
vt 0.126859 0.819596 0.0
vt 0.369372 0.922198 0.0
vt 0.335331 0.970846 0.0
vt 0.371348 0.895527 0.0
vt 0.491164 0.550942 0.0
vt 0.577868 0.298306 0.0
vt 0.558467 0.612467 0.0
vt 0.505448 0.416198 0.0
vt 0.555397 0.266765 0.0
vt 0.577868 0.298306 0.0
vt 0.558467 0.612467 0.0
vt 0.577868 0.298306 0.0
vt 0.723034 0.402362 0.0
vt 0.371348 0.895527 0.0
vt 0.281446 0.962733 0.0
vt 0.261835 0.867033 0.0
vt 0.953640 0.666814 0.0
vt 0.808452 0.389397 0.0
vt 0.981611 0.528022 0.0
vt 0.624017 0.778365 0.0
vt 0.506269 0.641901 0.0
vt 0.558467 0.612467 0.0
vt 0.411957 0.151904 0.0
vt 0.287601 0.298637 0.0
vt 0.307948 0.131599 0.0
vt 0.558467 0.612467 0.0
vt 0.723034 0.402362 0.0
vt 0.781201 0.684506 0.0
vt 0.999896 0.329927 0.0
vt 1.000000 0.403880 0.0
vt 0.988984 0.394929 0.0
vt 0.320351 0.001254 0.0
vt 0.307948 0.131599 0.0
vt 0.272563 0.074501 0.0
vt 0.222040 0.159944 0.0
vt 0.121510 0.377889 0.0
vt 0.116060 0.270683 0.0
vt 0.988866 0.285934 0.0
vt 0.988984 0.403880 0.0
vt 0.981611 0.401927 0.0
vt 0.412210 0.735929 0.0
vt 0.371348 0.895527 0.0
vt 0.261835 0.867033 0.0
vt 0.307948 0.131599 0.0
vt 0.222040 0.159944 0.0
vt 0.272563 0.074501 0.0
vt 0.186781 0.596273 0.0
vt 0.261835 0.867033 0.0
vt 0.226137 0.899355 0.0
vt 0.989735 0.142871 0.0
vt 0.981665 0.285934 0.0
vt 0.981611 0.134656 0.0
vt 0.168125 0.185867 0.0
vt 0.053402 0.275501 0.0
vt 0.125713 0.193078 0.0
vt 0.320351 0.001254 0.0
vt 0.374456 0.069761 0.0
vt 0.307948 0.131599 0.0
vt 0.981611 0.528022 0.0
vt 0.891904 0.213888 0.0
vt 0.961674 0.385950 0.0
vt 0.577868 0.298306 0.0
vt 0.771236 0.117795 0.0
vt 0.723034 0.402362 0.0
vt 0.891904 0.213888 0.0
vt 0.900149 0.186074 0.0
vt 0.961674 0.385950 0.0
vt 0.722069 0.057664 0.0
vt 0.783579 0.000000 0.0
vt 0.771236 0.117795 0.0
vt 0.827369 0.993790 0.0
vt 0.878337 0.929848 0.0
vt 0.826455 0.998792 0.0
vt 0.087523 0.601090 0.0
vt 0.073696 0.735404 0.0
vt 0.020980 0.594480 0.0
vt 0.988937 0.000000 0.0
vt 0.989735 0.142871 0.0
vt 0.981611 0.134656 0.0
vt 0.083485 0.360573 0.0
vt 0.000000 0.451794 0.0
vt 0.012067 0.360723 0.0
vt 0.274111 0.532812 0.0
vt 0.261835 0.867033 0.0
vt 0.186781 0.596273 0.0
vt 0.451917 0.284359 0.0
vt 0.274111 0.532812 0.0
vt 0.287601 0.298637 0.0
vt 0.121510 0.377889 0.0
vt 0.083485 0.360573 0.0
vt 0.116060 0.270683 0.0
vt 0.827369 0.993790 0.0
vt 0.869953 0.927715 0.0
vt 0.878337 0.929848 0.0
vt 0.307948 0.131599 0.0
vt 0.199788 0.303000 0.0
vt 0.222040 0.159944 0.0
vt 0.817231 0.844578 0.0
vt 0.953640 0.666814 0.0
vt 0.933161 0.846644 0.0
vt 0.605709 0.182150 0.0
vt 0.722069 0.057664 0.0
vt 0.577868 0.298306 0.0
vt 0.475928 0.612900 0.0
vt 0.421102 0.813253 0.0
vt 0.412210 0.735929 0.0
vt 0.307948 0.131599 0.0
vt 0.287601 0.298637 0.0
vt 0.199788 0.303000 0.0
vt 0.487029 0.349050 0.0
vt 0.460932 0.500211 0.0
vt 0.451917 0.284359 0.0
vt 0.432079 0.152504 0.0
vt 0.451917 0.284359 0.0
vt 0.411957 0.151904 0.0
vt 0.451917 0.284359 0.0
vt 0.460932 0.500211 0.0
vt 0.274111 0.532812 0.0
vt 0.186781 0.596273 0.0
vt 0.121510 0.377889 0.0
vt 0.199788 0.303000 0.0
vt 0.555397 0.266765 0.0
vt 0.605709 0.182150 0.0
vt 0.577868 0.298306 0.0
vt 0.577868 0.298306 0.0
vt 0.722069 0.057664 0.0
vt 0.771236 0.117795 0.0
vt 0.261835 0.867033 0.0
vt 0.281446 0.962733 0.0
vt 0.226137 0.899355 0.0
vt 0.727727 0.895507 0.0
vt 0.625492 0.808590 0.0
vt 0.624017 0.778365 0.0
vt 0.832011 1.000000 0.0
vt 0.817231 0.844578 0.0
vt 0.869953 0.927715 0.0
vt 0.997389 0.211236 0.0
vt 0.997132 0.285934 0.0
vt 0.989735 0.216661 0.0
vt 0.371348 0.895527 0.0
vt 0.335331 0.970846 0.0
vt 0.281446 0.962733 0.0
vt 0.624017 0.778365 0.0
vt 0.558467 0.612467 0.0
vt 0.781201 0.684506 0.0
vt 0.487029 0.349050 0.0
vt 0.491164 0.470685 0.0
vt 0.460932 0.500211 0.0
vt 0.121510 0.377889 0.0
vt 0.074265 0.456274 0.0
vt 0.083485 0.360573 0.0
vt 0.226137 0.899355 0.0
vt 0.281446 0.962733 0.0
vt 0.247398 0.943110 0.0
vt 0.074265 0.456274 0.0
vt 0.087523 0.601090 0.0
vt 0.020980 0.594480 0.0
vt 0.953640 0.666814 0.0
vt 0.981611 0.528022 0.0
vt 0.981584 0.649672 0.0
vt 0.421102 0.813253 0.0
vt 0.371348 0.895527 0.0
vt 0.412210 0.735929 0.0
vt 0.287601 0.298637 0.0
vt 0.186781 0.596273 0.0
vt 0.199788 0.303000 0.0
vt 0.149569 0.745541 0.0
vt 0.121510 0.377889 0.0
vt 0.186781 0.596273 0.0
vt 0.869953 0.927715 0.0
vt 0.817231 0.844578 0.0
vt 0.933161 0.846644 0.0
vt 0.165524 0.824945 0.0
vt 0.226137 0.899355 0.0
vt 0.188960 0.892098 0.0
vt 0.832011 1.000000 0.0
vt 0.624017 0.778365 0.0
vt 0.817231 0.844578 0.0
vt 0.625492 0.808590 0.0
vt 0.550453 0.726772 0.0
vt 0.624017 0.778365 0.0
vt 0.121510 0.377889 0.0
vt 0.149569 0.745541 0.0
vt 0.087523 0.601090 0.0
vt 0.891904 0.213888 0.0
vt 0.844746 0.077571 0.0
vt 0.900149 0.186074 0.0
vt 0.374456 0.069761 0.0
vt 0.411957 0.151904 0.0
vt 0.307948 0.131599 0.0
vt 0.468141 0.246735 0.0
vt 0.487029 0.349050 0.0
vt 0.451917 0.284359 0.0
vt 0.116060 0.270683 0.0
vt 0.083485 0.360573 0.0
vt 0.012067 0.360723 0.0
vt 0.287601 0.298637 0.0
vt 0.274111 0.532812 0.0
vt 0.186781 0.596273 0.0
vt 0.412210 0.735929 0.0
vt 0.261835 0.867033 0.0
vt 0.274111 0.532812 0.0
vt 0.997368 0.021671 0.0
vt 0.989735 0.066319 0.0
vt 0.989804 0.000000 0.0
vt 0.186781 0.596273 0.0
vt 0.226137 0.899355 0.0
vt 0.149569 0.745541 0.0
vt 0.149569 0.745541 0.0
vt 0.165524 0.824945 0.0
vt 0.073696 0.735404 0.0
vt 0.475928 0.612900 0.0
vt 0.412210 0.735929 0.0
vt 0.460932 0.500211 0.0
vt 0.374456 0.069761 0.0
vt 0.432079 0.152504 0.0
vt 0.411957 0.151904 0.0
vt 0.723034 0.402362 0.0
vt 0.808452 0.389397 0.0
vt 0.781201 0.684506 0.0
vt 0.891904 0.213888 0.0
vt 0.771236 0.117795 0.0
vt 0.844746 0.077571 0.0
vt 0.832011 1.000000 0.0
vt 0.727727 0.895507 0.0
vt 0.624017 0.778365 0.0
vt 0.844746 0.077571 0.0
vt 0.775996 0.001766 0.0
vt 0.809104 0.029208 0.0
vt 0.781201 0.684506 0.0
vt 0.953640 0.666814 0.0
vt 0.817231 0.844578 0.0
vt 0.460932 0.500211 0.0
vt 0.412210 0.735929 0.0
vt 0.274111 0.532812 0.0
vt 0.083485 0.360573 0.0
vt 0.074265 0.456274 0.0
vt 0.000000 0.451794 0.0
vt 0.121510 0.377889 0.0
vt 0.087523 0.601090 0.0
vt 0.074265 0.456274 0.0
vt 0.998698 0.452229 0.0
vt 0.981611 0.415805 0.0
vt 0.998710 0.403880 0.0
vt 0.222040 0.159944 0.0
vt 0.116060 0.270683 0.0
vt 0.168125 0.185867 0.0
vt 0.272563 0.074501 0.0
vt 0.168125 0.185867 0.0
vt 0.125713 0.193078 0.0
vt 0.272563 0.074501 0.0
vt 0.125713 0.193078 0.0
vt 0.225048 0.105335 0.0
vt 0.491164 0.470685 0.0
vt 0.475928 0.612900 0.0
vt 0.460932 0.500211 0.0
vt 0.226137 0.899355 0.0
vt 0.247398 0.943110 0.0
vt 0.188960 0.892098 0.0
vt 0.506269 0.641901 0.0
vt 0.491164 0.550942 0.0
vt 0.558467 0.612467 0.0
vt 0.808452 0.389397 0.0
vt 0.771236 0.117795 0.0
vt 0.891904 0.213888 0.0
vt 0.605709 0.182150 0.0
vt 0.665379 0.109148 0.0
vt 0.722069 0.057664 0.0
vt 0.869953 0.927715 0.0
vt 0.933161 0.846644 0.0
vt 0.878337 0.929848 0.0
vt 0.272563 0.074501 0.0
vt 0.222040 0.159944 0.0
vt 0.168125 0.185867 0.0
vt 0.624017 0.778365 0.0
vt 0.781201 0.684506 0.0
vt 0.817231 0.844578 0.0
vt 0.421102 0.813253 0.0
vt 0.369372 0.922198 0.0
vt 0.371348 0.895527 0.0
vt 0.074265 0.456274 0.0
vt 0.020980 0.594480 0.0
vt 0.000000 0.451794 0.0
vt 0.116060 0.270683 0.0
vt 0.012067 0.360723 0.0
vt 0.053402 0.275501 0.0
vt 0.335331 0.970846 0.0
vt 0.303178 0.998558 0.0
vt 0.281446 0.962733 0.0
vt 0.411957 0.151904 0.0
vt 0.451917 0.284359 0.0
vt 0.287601 0.298637 0.0
vt 0.168125 0.185867 0.0
vt 0.116060 0.270683 0.0
vt 0.053402 0.275501 0.0
vn 0.229713 -0.054811 -0.971679
vn 0.137211 0.913755 -0.382305
vn 0.332560 -0.254799 -0.907987
vn -0.260170 -0.135258 0.956023
vn -0.132084 0.036134 0.990570
vn -0.044343 0.966277 0.253639
vn -0.017518 -0.961547 0.273995
vn -0.457320 -0.139866 -0.878201
vn -0.380200 -0.439863 -0.813593
vn 0.026948 0.942564 0.332896
vn 0.008118 -0.999603 0.026246
vn 0.061892 -0.490005 -0.869503
vn 0.008698 -0.994049 0.108432
vn 0.575182 0.641591 0.507431
vn 0.401715 -0.230140 0.886349
vn 0.267678 -0.234413 0.934538
vn 0.039064 0.961119 -0.273263
vn 0.061007 0.980590 -0.186193
vn 0.014130 -0.199500 -0.979766
vn 0.095035 -0.655446 -0.749199
vn 0.038697 -0.990173 -0.134190
vn -0.050539 0.120670 0.991394
vn -0.007935 -0.997986 0.062502
vn -0.326182 -0.139378 -0.934935
vn -0.153294 -0.167821 -0.973815
vn -0.145909 -0.951231 -0.271706
vn -0.015473 0.999756 0.015046
vn -0.015900 0.998169 -0.057955
vn -0.070009 0.994873 -0.072909
vn 0.150792 0.953856 -0.259529
vn 0.037690 -0.956816 0.288186
vn 0.018769 -0.232734 0.972350
vn 0.437483 -0.142857 -0.887783
vn 0.382458 0.287881 0.877957
vn 0.097903 0.956420 0.274972
vn -0.011780 -0.995941 -0.088931
vn 0.494278 0.350902 -0.795312
vn 0.038759 0.999237 -0.002350
vn -0.082675 0.968963 0.232856
vn -0.019471 0.999786 -0.000031
vn -0.056246 0.998413 0.001038
vn 0.447035 0.426313 -0.786370
vn 0.452223 0.320109 -0.832453
vn -0.135990 -0.116459 -0.983825
vn -0.105533 0.948759 -0.297830
vn 0.040315 0.982269 0.183050
vn 0.012146 0.999847 0.011628
vn 0.109745 0.472030 -0.874691
vn -0.179693 0.915586 -0.359722
vn -0.446181 -0.131138 -0.885250
vn -0.264962 -0.343577 0.900937
vn 0.096591 0.071230 0.992767
vn 0.187231 0.124241 0.974395
vn -0.180456 -0.725211 0.664418
vn -0.051332 0.938719 -0.340800
vn 0.005219 0.999969 0.004639
vn -0.296854 -0.361522 0.883816
vn -0.028596 -0.996551 0.077853
vn 0.009278 0.965728 0.259285
vn 0.000427 0.950407 -0.310923
usemtl (null)
s 1
f 14/1/1 42/2/2 15/3/3
f 53/4/4 37/5/5 32/6/6
f 53/7/4 28/8/7 37/9/5
f 12/10/8 2/11/9 50/12/10
f 54/13/11 55/14/12 8/15/13
f 19/16/14 50/17/10 2/18/9
f 55/19/12 41/20/15 10/21/16
f 25/22/17 58/23/18 14/24/1
f 34/25/19 47/26/20 7/27/21
f 28/28/7 31/29/22 37/30/5
f 51/31/23 8/32/13 28/33/7
f 18/34/24 5/35/25 13/36/26
f 23/37/27 1/38/28 33/39/29
f 58/40/18 44/41/30 42/42/2
f 8/43/13 45/44/31 49/45/32
f 42/46/2 57/47/33 15/48/3
f 10/49/16 39/50/34 17/51/35
f 34/52/19 7/53/21 52/54/36
f 47/55/20 14/56/1 7/57/21
f 52/58/36 7/59/21 54/60/11
f 17/61/35 11/62/37 22/63/38
f 28/64/7 8/65/13 49/66/32
f 13/67/26 5/68/25 52/69/36
f 24/70/39 59/71/40 48/72/41
f 52/73/36 54/74/11 51/75/23
f 29/76/42 27/77/43 35/78/44
f 19/79/14 48/80/41 50/81/10
f 33/82/29 1/83/28 56/84/45
f 55/85/12 35/86/44 41/87/15
f 26/88/46 17/89/35 22/90/38
f 48/91/41 33/92/29 50/93/10
f 43/94/47 22/95/38 44/96/30
f 60/97/48 14/98/1 47/99/20
f 16/100/49 18/101/24 36/102/50
f 19/103/14 21/104/51 48/105/41
f 49/106/32 45/107/31 3/108/52
f 7/109/21 55/110/12 54/111/11
f 45/112/31 6/113/53 3/114/52
f 29/115/42 35/116/44 55/117/12
f 30/118/54 21/119/51 19/120/14
f 25/121/17 14/122/1 60/123/48
f 34/124/19 60/125/48 47/126/20
f 46/127/55 34/128/19 5/129/25
f 4/130/56 22/131/38 43/132/47
f 32/133/6 4/134/56 59/135/40
f 1/136/28 46/137/55 56/138/45
f 30/139/54 20/140/57 21/141/51
f 48/142/41 23/143/27 33/144/29
f 9/145/58 28/146/7 53/147/4
f 15/148/3 29/149/42 7/150/21
f 3/151/52 6/152/53 26/153/46
f 48/154/41 59/155/40 23/156/27
f 31/157/22 38/158/59 32/159/6
f 53/160/4 32/161/6 24/162/39
f 32/163/6 38/164/59 4/165/56
f 43/166/47 1/167/28 23/168/27
f 14/169/1 15/170/3 7/171/21
f 7/172/21 29/173/42 55/174/12
f 22/175/38 11/176/37 44/177/30
f 12/178/8 36/179/50 13/180/26
f 2/181/9 9/182/58 20/183/57
f 2/184/9 20/185/57 30/186/54
f 17/187/35 39/188/34 11/189/37
f 13/190/26 52/191/36 51/192/23
f 31/193/22 49/194/32 38/195/59
f 1/196/28 40/197/60 46/198/55
f 44/199/30 11/200/37 29/201/42
f 40/202/60 25/203/17 60/204/48
f 28/205/7 49/206/32 31/207/22
f 6/208/53 17/209/35 26/210/46
f 59/211/40 43/212/47 23/213/27
f 58/214/18 1/215/28 43/216/47
f 20/217/57 9/218/58 53/219/4
f 42/220/2 44/221/30 57/222/33
f 2/223/9 13/224/26 9/225/58
f 36/226/50 18/227/24 13/228/26
f 1/229/28 58/230/18 25/231/17
f 45/232/31 10/233/16 6/234/53
f 21/235/51 24/236/39 48/237/41
f 37/238/5 31/239/22 32/240/6
f 56/241/45 46/242/55 5/243/25
f 59/244/40 4/245/56 43/246/47
f 26/247/46 22/248/38 4/249/56
f 11/250/37 27/251/43 29/252/42
f 43/253/47 44/254/30 58/255/18
f 58/256/18 42/257/2 14/258/1
f 3/259/52 26/260/46 38/261/59
f 21/262/51 53/263/4 24/264/39
f 54/265/11 8/266/13 51/267/23
f 45/268/31 55/269/12 10/270/16
f 2/271/9 12/272/8 13/273/26
f 10/274/16 41/275/15 39/276/34
f 51/277/23 28/278/7 9/279/58
f 38/280/59 26/281/46 4/282/56
f 46/283/55 40/284/60 34/285/19
f 1/286/28 25/287/17 40/288/60
f 11/289/37 41/290/15 27/291/43
f 33/292/29 56/293/45 16/294/49
f 50/295/10 16/296/49 36/297/50
f 50/298/10 36/299/50 12/300/8
f 49/301/32 3/302/52 38/303/59
f 44/304/30 29/305/42 57/306/33
f 5/307/25 34/308/19 52/309/36
f 8/310/13 55/311/12 45/312/31
f 15/313/3 57/314/33 29/315/42
f 20/316/57 53/317/4 21/318/51
f 50/319/10 33/320/29 16/321/49
f 13/322/26 51/323/23 9/324/58
f 6/325/53 10/326/16 17/327/35
f 40/328/60 60/329/48 34/330/19
f 56/331/45 5/332/25 18/333/24
f 39/334/34 41/335/15 11/336/37
f 24/337/39 32/338/6 59/339/40
f 16/340/49 56/341/45 18/342/24

View file

@ -0,0 +1,12 @@
# Blender3D MTL File:
# Material Count: 1
newmtl (null).001
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

View file

@ -0,0 +1,770 @@
# Blender3D v245 OBJ File: seed.blend
# www.blender3d.org
mtllib seed.mtl
o Cube_Cube.001
v 1.221041 -1.702002 -0.546279
v 1.233427 -1.583117 0.729731
v 1.178437 0.928835 -1.709087
v -1.761092 -0.487755 -0.522942
v -0.688353 -2.004662 -0.666274
v -0.093595 0.959288 -1.855016
v 0.487953 -1.646613 1.195946
v 0.827805 -0.888284 -1.696130
v 1.785367 -0.426664 -0.433229
v -0.759986 -1.600365 -1.166784
v -0.520387 -0.447532 1.690327
v -1.248192 -1.703656 -0.471514
v 0.847865 -0.008070 1.817925
v 1.847417 -0.898883 0.486957
v -0.021104 2.012028 0.892526
v 1.397422 0.472701 1.349872
v -0.683116 1.950675 -0.698182
v 1.195548 0.000984 -1.742694
v 0.607084 -0.432487 -1.701792
v 1.378576 -0.401227 -1.319254
v -0.718459 -2.112875 0.252606
v 0.051565 2.238782 0.044846
v 2.001967 -0.001635 0.502407
v -0.458405 -0.034569 1.912255
v 0.592267 0.477989 1.744324
v -0.563858 -0.017975 -1.902761
v -1.639108 0.418249 -0.946720
v -1.794961 0.849395 0.835335
v 0.014508 -2.118439 -0.685310
v 0.731587 -1.614124 -1.174462
v 1.737039 0.496819 -0.773053
v -0.001636 -2.107388 0.652609
v -1.236814 -1.629705 0.653059
v -1.186898 -0.908879 1.542204
v -1.468697 0.839571 -1.235888
v -1.409908 -0.888405 -1.346238
v -1.084387 0.429269 1.559983
v -1.826992 -0.951801 0.558436
v 0.770765 -0.427680 1.608089
v 0.589026 -0.889892 1.739814
v 1.515636 0.004087 1.451145
v 1.607533 -0.423020 1.015778
v -1.462904 -0.064238 1.452331
v -0.570988 -0.907825 -1.743266
v 1.625535 -0.860910 -1.182391
v -1.751670 -0.940982 -0.757772
v -0.681292 1.601254 1.204959
v 1.139731 0.489714 -1.568557
v -1.122080 0.905242 1.685176
v 1.213168 1.566025 0.955511
v 1.826363 0.509289 0.460049
v -1.777490 0.396632 0.570141
v 1.437443 -0.836676 1.350222
v -1.559264 -0.474133 1.044918
v -0.980284 1.901717 0.056233
v 0.059711 2.119792 -0.664256
v 0.759041 2.129376 0.046131
v 0.452632 0.953977 1.879595
v 1.963308 0.982669 0.019815
v 1.911563 0.008562 -0.817632
v -1.965649 -0.088115 0.590765
v 1.611745 0.922850 1.363833
v 0.656671 1.683118 -1.316851
v 1.311276 1.719500 0.070508
v 1.830199 0.960789 -0.855755
v 0.001853 -2.251091 -0.021194
v -1.872660 0.862941 -0.721947
v -0.241456 0.500319 -1.757971
v -1.786815 -0.059061 -1.087677
v -0.887463 1.798638 0.834816
v -1.095748 -0.441742 -1.490339
v 0.018770 -1.684757 -1.225649
v 0.713386 1.914374 0.944882
v -0.795512 -1.606322 1.147262
v 0.711679 -1.976701 0.640985
v 0.796523 2.006572 -0.696318
v 0.705030 -2.088246 -0.381301
v -1.236250 1.547626 -0.689512
vt 0.572347 0.627109 0.0
vt 0.584280 0.754201 0.0
vt 0.542255 0.789870 0.0
vt 0.947654 0.642652 0.0
vt 0.984381 0.831318 0.0
vt 0.872949 0.777180 0.0
vt 0.848767 0.585228 0.0
vt 0.782231 0.625403 0.0
vt 0.773210 0.574561 0.0
vt 0.872949 0.777180 0.0
vt 0.984381 0.831318 0.0
vt 0.866439 0.867046 0.0
vt 0.291254 0.448767 0.0
vt 0.245037 0.384139 0.0
vt 0.315999 0.391707 0.0
vt 0.560174 0.377747 0.0
vt 0.469494 0.374356 0.0
vt 0.494803 0.256741 0.0
vt 0.513274 0.434831 0.0
vt 0.541881 0.496630 0.0
vt 0.470493 0.496478 0.0
vt 0.811381 0.263234 0.0
vt 0.714903 0.239726 0.0
vt 0.784563 0.179246 0.0
vt 0.513274 0.434831 0.0
vt 0.470493 0.496478 0.0
vt 0.385185 0.437725 0.0
vt 0.063552 0.396861 0.0
vt 0.120746 0.265735 0.0
vt 0.134118 0.389108 0.0
vt 0.111795 0.516734 0.0
vt 0.030663 0.587692 0.0
vt 0.029461 0.514366 0.0
vt 0.951366 0.249891 0.0
vt 0.811381 0.263234 0.0
vt 0.966540 0.163245 0.0
vt 0.704331 0.577300 0.0
vt 0.782231 0.625403 0.0
vt 0.691013 0.636718 0.0
vt 0.728898 0.952981 0.0
vt 0.443807 0.829233 0.0
vt 0.542255 0.789870 0.0
vt 0.966540 0.163245 0.0
vt 0.811381 0.263234 0.0
vt 0.784563 0.179246 0.0
vt 0.245037 0.384139 0.0
vt 0.281413 0.268325 0.0
vt 0.315999 0.391707 0.0
vt 0.111795 0.516734 0.0
vt 0.082390 0.455161 0.0
vt 0.149825 0.449172 0.0
vt 0.107239 0.588517 0.0
vt 0.111795 0.516734 0.0
vt 0.219344 0.598248 0.0
vt 0.376058 0.632080 0.0
vt 0.443807 0.829233 0.0
vt 0.357596 0.756429 0.0
vt 0.385185 0.437725 0.0
vt 0.470493 0.496478 0.0
vt 0.348447 0.506792 0.0
vt 0.811381 0.263234 0.0
vt 0.849833 0.380208 0.0
vt 0.776962 0.388286 0.0
vt 0.469494 0.374356 0.0
vt 0.385185 0.437725 0.0
vt 0.367056 0.380739 0.0
vt 0.494803 0.256741 0.0
vt 0.469494 0.374356 0.0
vt 0.371231 0.249900 0.0
vt 0.784563 0.179246 0.0
vt 0.714903 0.239726 0.0
vt 0.655616 0.133075 0.0
vt 0.385185 0.437725 0.0
vt 0.348447 0.506792 0.0
vt 0.291254 0.448767 0.0
vt 0.241345 0.515399 0.0
vt 0.291254 0.448767 0.0
vt 0.348447 0.506792 0.0
vt 0.376058 0.632080 0.0
vt 0.357596 0.756429 0.0
vt 0.327496 0.635972 0.0
vt 0.966540 0.163245 0.0
vt 0.784563 0.179246 0.0
vt 0.971571 0.045565 0.0
vt 0.945693 0.587692 0.0
vt 0.947654 0.642652 0.0
vt 0.882308 0.645193 0.0
vt 0.082390 0.455161 0.0
vt 0.063552 0.396861 0.0
vt 0.134118 0.389108 0.0
vt 0.971571 0.045565 0.0
vt 0.784563 0.179246 0.0
vt 0.655616 0.133075 0.0
vt 0.866439 0.867046 0.0
vt 0.654178 0.839007 0.0
vt 0.747864 0.800484 0.0
vt 0.872949 0.777180 0.0
vt 0.747864 0.800484 0.0
vt 0.785727 0.736340 0.0
vt 0.327496 0.635972 0.0
vt 0.219344 0.598248 0.0
vt 0.352585 0.578193 0.0
vt 0.110392 0.639106 0.0
vt 0.107239 0.588517 0.0
vt 0.219344 0.598248 0.0
vt 0.944490 0.514366 0.0
vt 0.945693 0.587692 0.0
vt 0.848767 0.585228 0.0
vt 0.654178 0.839007 0.0
vt 0.542255 0.789870 0.0
vt 0.584280 0.754201 0.0
vt 0.848767 0.585228 0.0
vt 0.882308 0.645193 0.0
vt 0.782231 0.625403 0.0
vt 0.945693 0.587692 0.0
vt 0.882308 0.645193 0.0
vt 0.848767 0.585228 0.0
vt 0.111795 0.516734 0.0
vt 0.149825 0.449172 0.0
vt 0.241345 0.515399 0.0
vt 0.849833 0.380208 0.0
vt 0.921183 0.445511 0.0
vt 0.804295 0.442466 0.0
vt 0.036336 0.249891 0.0
vt 0.051511 0.163245 0.0
vt 0.120746 0.265735 0.0
vt 0.107239 0.588517 0.0
vt 0.110392 0.639106 0.0
vt 0.032625 0.642652 0.0
vt 0.032625 0.642652 0.0
vt 0.129759 0.765426 0.0
vt 0.069352 0.831318 0.0
vt 0.811381 0.263234 0.0
vt 0.776962 0.388286 0.0
vt 0.714903 0.239726 0.0
vt 0.063552 0.396861 0.0
vt 0.082390 0.455161 0.0
vt 0.006154 0.445511 0.0
vt 0.866439 0.867046 0.0
vt 0.728898 0.952981 0.0
vt 0.654178 0.839007 0.0
vt 0.704331 0.577300 0.0
vt 0.691013 0.636718 0.0
vt 0.572347 0.627109 0.0
vt 0.082390 0.455161 0.0
vt 0.029461 0.514366 0.0
vt 0.006154 0.445511 0.0
vt 0.051511 0.163245 0.0
vt 0.203090 0.063437 0.0
vt 0.197246 0.151828 0.0
vt 0.474113 0.569795 0.0
vt 0.493066 0.625939 0.0
vt 0.376058 0.632080 0.0
vt 0.371231 0.249900 0.0
vt 0.367056 0.380739 0.0
vt 0.315999 0.391707 0.0
vt 0.921183 0.445511 0.0
vt 0.849868 0.508108 0.0
vt 0.804295 0.442466 0.0
vt 0.206696 0.657078 0.0
vt 0.219344 0.598248 0.0
vt 0.327496 0.635972 0.0
vt 0.149825 0.449172 0.0
vt 0.245037 0.384139 0.0
vt 0.291254 0.448767 0.0
vt 0.371231 0.249900 0.0
vt 0.315999 0.391707 0.0
vt 0.281413 0.268325 0.0
vt 0.120746 0.265735 0.0
vt 0.051511 0.163245 0.0
vt 0.197246 0.151828 0.0
vt 0.219344 0.598248 0.0
vt 0.348447 0.506792 0.0
vt 0.352585 0.578193 0.0
vt 0.947654 0.642652 0.0
vt 0.872949 0.777180 0.0
vt 0.882308 0.645193 0.0
vt 0.722348 0.435086 0.0
vt 0.720477 0.502440 0.0
vt 0.622603 0.498322 0.0
vt 0.493066 0.625939 0.0
vt 0.443807 0.829233 0.0
vt 0.376058 0.632080 0.0
vt 0.120746 0.265735 0.0
vt 0.197246 0.151828 0.0
vt 0.197562 0.243886 0.0
vt 0.951366 0.249891 0.0
vt 0.849833 0.380208 0.0
vt 0.811381 0.263234 0.0
vt 0.317312 0.838616 0.0
vt 0.206696 0.657078 0.0
vt 0.357596 0.756429 0.0
vt 0.747864 0.800484 0.0
vt 0.654178 0.839007 0.0
vt 0.691013 0.636718 0.0
vt 0.921183 0.445511 0.0
vt 0.944490 0.514366 0.0
vt 0.849868 0.508108 0.0
vt 0.655616 0.133075 0.0
vt 0.714903 0.239726 0.0
vt 0.565808 0.255673 0.0
vt 0.572347 0.627109 0.0
vt 0.654178 0.839007 0.0
vt 0.584280 0.754201 0.0
vt 0.082390 0.455161 0.0
vt 0.111795 0.516734 0.0
vt 0.029461 0.514366 0.0
vt 0.560174 0.377747 0.0
vt 0.613048 0.431416 0.0
vt 0.513274 0.434831 0.0
vt 0.541881 0.496630 0.0
vt 0.474113 0.569795 0.0
vt 0.470493 0.496478 0.0
vt 0.655616 0.133075 0.0
vt 0.565808 0.255673 0.0
vt 0.467084 0.152137 0.0
vt 0.082390 0.455161 0.0
vt 0.134118 0.389108 0.0
vt 0.149825 0.449172 0.0
vt 0.134118 0.389108 0.0
vt 0.120746 0.265735 0.0
vt 0.197562 0.243886 0.0
vt 0.219344 0.598248 0.0
vt 0.241345 0.515399 0.0
vt 0.348447 0.506792 0.0
vt 0.203090 0.063437 0.0
vt 0.655616 0.133075 0.0
vt 0.467084 0.152137 0.0
vt 0.872949 0.777180 0.0
vt 0.866439 0.867046 0.0
vt 0.747864 0.800484 0.0
vt 0.776962 0.388286 0.0
vt 0.704931 0.371955 0.0
vt 0.714903 0.239726 0.0
vt 0.952771 0.868983 0.0
vt 0.317312 0.838616 0.0
vt 0.728898 0.952981 0.0
vt 0.613048 0.431416 0.0
vt 0.622603 0.498322 0.0
vt 0.541881 0.496630 0.0
vt 0.882308 0.645193 0.0
vt 0.872949 0.777180 0.0
vt 0.785727 0.736340 0.0
vt 0.722348 0.435086 0.0
vt 0.622603 0.498322 0.0
vt 0.613048 0.431416 0.0
vt 0.206696 0.657078 0.0
vt 0.327496 0.635972 0.0
vt 0.357596 0.756429 0.0
vt 0.371231 0.249900 0.0
vt 0.469494 0.374356 0.0
vt 0.367056 0.380739 0.0
vt 0.241345 0.515399 0.0
vt 0.149825 0.449172 0.0
vt 0.291254 0.448767 0.0
vt 0.776962 0.388286 0.0
vt 0.722348 0.435086 0.0
vt 0.704931 0.371955 0.0
vt 0.467084 0.152137 0.0
vt 0.565808 0.255673 0.0
vt 0.494803 0.256741 0.0
vt 0.951366 0.249891 0.0
vt 0.978581 0.396861 0.0
vt 0.849833 0.380208 0.0
vt 0.110392 0.639106 0.0
vt 0.219344 0.598248 0.0
vt 0.206696 0.657078 0.0
vt 0.622603 0.498322 0.0
vt 0.568945 0.569468 0.0
vt 0.541881 0.496630 0.0
vt 0.714903 0.239726 0.0
vt 0.704931 0.371955 0.0
vt 0.560174 0.377747 0.0
vt 0.984381 0.831318 0.0
vt 0.952771 0.868983 0.0
vt 0.866439 0.867046 0.0
vt 0.704931 0.371955 0.0
vt 0.613048 0.431416 0.0
vt 0.560174 0.377747 0.0
vt 0.149825 0.449172 0.0
vt 0.134118 0.389108 0.0
vt 0.245037 0.384139 0.0
vt 0.315999 0.391707 0.0
vt 0.385185 0.437725 0.0
vt 0.291254 0.448767 0.0
vt 0.467084 0.152137 0.0
vt 0.494803 0.256741 0.0
vt 0.371231 0.249900 0.0
vt 0.197246 0.151828 0.0
vt 0.203090 0.063437 0.0
vt 0.467084 0.152137 0.0
vt 0.197246 0.151828 0.0
vt 0.467084 0.152137 0.0
vt 0.311063 0.188687 0.0
vt 0.134118 0.389108 0.0
vt 0.197562 0.243886 0.0
vt 0.245037 0.384139 0.0
vt 0.470493 0.496478 0.0
vt 0.474113 0.569795 0.0
vt 0.352585 0.578193 0.0
vt 0.704931 0.371955 0.0
vt 0.722348 0.435086 0.0
vt 0.613048 0.431416 0.0
vt 0.804295 0.442466 0.0
vt 0.774465 0.505649 0.0
vt 0.720477 0.502440 0.0
vt 0.470493 0.496478 0.0
vt 0.352585 0.578193 0.0
vt 0.348447 0.506792 0.0
vt 0.565808 0.255673 0.0
vt 0.560174 0.377747 0.0
vt 0.494803 0.256741 0.0
vt 0.197562 0.243886 0.0
vt 0.197246 0.151828 0.0
vt 0.311063 0.188687 0.0
vt 0.474113 0.569795 0.0
vt 0.376058 0.632080 0.0
vt 0.352585 0.578193 0.0
vt 0.572347 0.627109 0.0
vt 0.542255 0.789870 0.0
vt 0.493066 0.625939 0.0
vt 0.129759 0.765426 0.0
vt 0.110392 0.639106 0.0
vt 0.206696 0.657078 0.0
vt 0.804295 0.442466 0.0
vt 0.720477 0.502440 0.0
vt 0.722348 0.435086 0.0
vt 0.197562 0.243886 0.0
vt 0.311063 0.188687 0.0
vt 0.281413 0.268325 0.0
vt 0.849868 0.508108 0.0
vt 0.848767 0.585228 0.0
vt 0.773210 0.574561 0.0
vt 0.129759 0.765426 0.0
vt 0.206696 0.657078 0.0
vt 0.317312 0.838616 0.0
vt 0.245037 0.384139 0.0
vt 0.197562 0.243886 0.0
vt 0.281413 0.268325 0.0
vt 0.129759 0.765426 0.0
vt 0.184290 0.886855 0.0
vt 0.069352 0.831318 0.0
vt 0.063552 0.396861 0.0
vt 0.036336 0.249891 0.0
vt 0.120746 0.265735 0.0
vt 0.541881 0.496630 0.0
vt 0.568945 0.569468 0.0
vt 0.474113 0.569795 0.0
vt 0.352585 0.578193 0.0
vt 0.376058 0.632080 0.0
vt 0.327496 0.635972 0.0
vt 0.568945 0.569468 0.0
vt 0.572347 0.627109 0.0
vt 0.493066 0.625939 0.0
vt 0.311063 0.188687 0.0
vt 0.467084 0.152137 0.0
vt 0.371231 0.249900 0.0
vt 0.714903 0.239726 0.0
vt 0.560174 0.377747 0.0
vt 0.565808 0.255673 0.0
vt 0.978581 0.396861 0.0
vt 0.921183 0.445511 0.0
vt 0.849833 0.380208 0.0
vt 0.952771 0.868983 0.0
vt 0.728898 0.952981 0.0
vt 0.866439 0.867046 0.0
vt 0.849868 0.508108 0.0
vt 0.773210 0.574561 0.0
vt 0.774465 0.505649 0.0
vt 0.568945 0.569468 0.0
vt 0.493066 0.625939 0.0
vt 0.474113 0.569795 0.0
vt 0.281413 0.268325 0.0
vt 0.311063 0.188687 0.0
vt 0.371231 0.249900 0.0
vt 0.219344 0.598248 0.0
vt 0.111795 0.516734 0.0
vt 0.241345 0.515399 0.0
vt 0.774465 0.505649 0.0
vt 0.704331 0.577300 0.0
vt 0.720477 0.502440 0.0
vt 0.469494 0.374356 0.0
vt 0.513274 0.434831 0.0
vt 0.385185 0.437725 0.0
vt 0.774465 0.505649 0.0
vt 0.773210 0.574561 0.0
vt 0.704331 0.577300 0.0
vt 0.782231 0.625403 0.0
vt 0.747864 0.800484 0.0
vt 0.691013 0.636718 0.0
vt 0.944490 0.514366 0.0
vt 0.848767 0.585228 0.0
vt 0.849868 0.508108 0.0
vt 0.613048 0.431416 0.0
vt 0.541881 0.496630 0.0
vt 0.513274 0.434831 0.0
vt 0.367056 0.380739 0.0
vt 0.385185 0.437725 0.0
vt 0.315999 0.391707 0.0
vt 0.493066 0.625939 0.0
vt 0.542255 0.789870 0.0
vt 0.443807 0.829233 0.0
vt 0.110392 0.639106 0.0
vt 0.129759 0.765426 0.0
vt 0.032625 0.642652 0.0
vt 0.107239 0.588517 0.0
vt 0.032625 0.642652 0.0
vt 0.030663 0.587692 0.0
vt 0.773210 0.574561 0.0
vt 0.782231 0.625403 0.0
vt 0.704331 0.577300 0.0
vt 0.704331 0.577300 0.0
vt 0.572347 0.627109 0.0
vt 0.568945 0.569468 0.0
vt 0.849833 0.380208 0.0
vt 0.804295 0.442466 0.0
vt 0.776962 0.388286 0.0
vt 0.111795 0.516734 0.0
vt 0.107239 0.588517 0.0
vt 0.030663 0.587692 0.0
vt 0.622603 0.498322 0.0
vt 0.704331 0.577300 0.0
vt 0.568945 0.569468 0.0
vt 0.804295 0.442466 0.0
vt 0.849868 0.508108 0.0
vt 0.774465 0.505649 0.0
vt 0.129759 0.765426 0.0
vt 0.317312 0.838616 0.0
vt 0.184290 0.886855 0.0
vt 0.720477 0.502440 0.0
vt 0.704331 0.577300 0.0
vt 0.622603 0.498322 0.0
vt 0.776962 0.388286 0.0
vt 0.804295 0.442466 0.0
vt 0.722348 0.435086 0.0
vt 0.317312 0.838616 0.0
vt 0.443807 0.829233 0.0
vt 0.728898 0.952981 0.0
vt 0.691013 0.636718 0.0
vt 0.654178 0.839007 0.0
vt 0.572347 0.627109 0.0
vt 0.782231 0.625403 0.0
vt 0.785727 0.736340 0.0
vt 0.747864 0.800484 0.0
vt 0.882308 0.645193 0.0
vt 0.785727 0.736340 0.0
vt 0.782231 0.625403 0.0
vt 0.560174 0.377747 0.0
vt 0.513274 0.434831 0.0
vt 0.469494 0.374356 0.0
vt 0.317312 0.838616 0.0
vt 0.357596 0.756429 0.0
vt 0.443807 0.829233 0.0
vt 0.728898 0.952981 0.0
vt 0.542255 0.789870 0.0
vt 0.654178 0.839007 0.0
vn -0.420362 0.257790 0.869930
vn -0.177404 0.680258 0.711142
vn -0.471603 0.801202 0.368236
vn 0.892514 0.230995 -0.387310
vn 0.406781 0.856807 -0.316782
vn 0.671682 0.739769 0.039369
vn 0.979858 -0.012604 0.199286
vn 0.752403 0.173345 0.635456
vn 0.727439 -0.016449 0.685934
vn 0.356975 0.932188 0.059511
vn -0.510208 -0.148015 -0.847194
vn -0.190008 -0.174047 -0.966216
vn -0.689261 -0.173223 -0.703482
vn -0.497696 -0.206427 0.842402
vn -0.953673 -0.197241 0.226997
vn -0.638569 -0.703726 0.311350
vn -0.834529 -0.130711 0.535203
vn -0.674886 -0.076205 0.733940
vn -0.974151 -0.097354 0.203803
vn 0.631489 -0.696402 0.340861
vn 0.152409 -0.677694 0.719321
vn 0.374340 -0.864772 0.334605
vn -0.965026 -0.160558 -0.207099
vn 0.821345 -0.209143 -0.530656
vn 0.319742 -0.700919 -0.637532
vn 0.305124 -0.241096 -0.921262
vn 0.490371 -0.050630 -0.870022
vn 0.941465 0.022767 -0.336314
vn 0.933256 -0.051424 -0.355480
vn 0.667745 -0.710807 -0.220954
vn 0.383923 -0.906949 -0.173223
vn 0.149022 0.091037 0.984619
vn 0.128025 0.227241 0.965361
vn -0.061464 0.996979 0.047395
vn -0.550798 0.834162 0.027497
vn -0.337291 -0.676595 -0.654530
vn 0.717612 -0.152409 -0.679525
vn 0.130284 -0.180578 -0.974883
vn 0.495560 0.017212 -0.868374
vn -0.225501 0.064364 -0.972106
vn -0.940336 0.191809 -0.280953
vn -0.585955 0.691763 -0.422010
vn -0.828578 -0.002594 -0.559801
vn 0.963622 -0.215247 0.158238
vn 0.669332 -0.175909 0.721824
vn -0.919889 -0.240883 -0.309458
vn -0.667684 -0.715140 -0.206610
vn -0.010437 -0.903531 0.428358
vn -0.255440 -0.037141 -0.966094
vn -0.597797 0.173986 -0.782495
vn 0.003540 -0.999969 -0.003449
vn 0.972198 0.231056 0.037721
vn -0.051881 0.835414 0.547136
vn 0.305063 0.824763 0.476058
vn 0.599322 0.709769 0.370128
vn -0.844600 0.002411 -0.535356
vn 0.490768 0.162694 -0.855953
vn 0.980773 -0.136204 -0.139531
vn 0.843593 -0.156133 0.513749
vn 0.204932 0.726707 -0.655629
vn -0.018403 -0.922483 -0.385571
vn -0.970031 0.013916 0.242561
vn -0.909696 0.205786 0.360607
vn 0.977447 -0.091494 0.190283
vn -0.168828 0.283151 -0.944090
vn 0.350078 -0.073702 0.933805
vn 0.328837 -0.171545 0.928648
vn -0.159612 -0.035737 0.986511
vn -0.004852 -0.689413 -0.724326
vn -0.368145 0.827448 -0.423933
vn -0.278848 -0.704520 0.652577
vn -0.257698 -0.105777 0.960387
vn -0.363628 -0.924863 0.111332
vn 0.170110 -0.228980 0.958434
vn -0.042207 0.927091 -0.372387
vn -0.513382 0.078890 0.854488
vn -0.334483 -0.868068 -0.366802
vn 0.683950 -0.076724 0.725455
usemtl (null)
s 1
f 49/1/1 47/2/2 70/3/3
f 65/4/4 76/5/5 64/6/6
f 51/7/7 62/8/8 16/9/9
f 64/10/6 76/11/5 57/12/10
f 71/13/11 44/14/12 36/15/13
f 34/16/14 38/17/15 33/18/16
f 54/19/17 43/20/18 61/21/19
f 2/22/20 7/23/21 75/24/22
f 54/25/17 61/26/19 4/27/23
f 45/28/24 30/29/25 8/30/26
f 18/31/27 31/32/28 60/33/29
f 1/34/30 2/35/20 77/36/31
f 25/37/32 62/38/8 58/39/33
f 22/40/34 55/41/35 70/42/3
f 77/43/31 2/44/20 75/45/22
f 44/46/12 10/47/36 36/48/13
f 18/49/27 20/50/37 19/51/38
f 48/52/39 18/53/27 68/54/40
f 67/55/41 55/56/35 78/57/42
f 4/58/23 61/59/19 69/60/43
f 2/61/20 14/62/44 53/63/45
f 38/64/15 4/65/23 46/66/46
f 33/67/16 38/68/15 12/69/47
f 75/70/22 7/71/21 32/72/48
f 4/73/23 69/74/43 71/75/11
f 26/76/49 71/77/11 69/78/43
f 67/79/41 78/80/42 35/81/50
f 77/82/31 75/83/22 66/84/51
f 31/85/28 65/86/4 59/87/52
f 20/88/37 45/89/24 8/90/26
f 66/91/51 75/92/22 32/93/48
f 57/94/10 15/95/53 73/96/54
f 64/97/6 73/98/54 50/99/55
f 35/100/50 68/101/40 27/102/56
f 3/103/57 48/104/39 68/105/40
f 60/106/29 31/107/28 51/108/7
f 15/109/53 70/110/3 47/111/2
f 51/112/7 59/113/52 62/114/8
f 31/115/28 59/116/52 51/117/7
f 18/118/27 19/119/38 26/120/49
f 14/121/44 9/122/58 42/123/59
f 1/124/30 77/125/31 30/126/25
f 48/127/39 3/128/57 65/129/4
f 65/130/4 63/131/60 76/132/5
f 2/133/20 53/134/45 7/135/21
f 45/136/24 20/137/37 9/138/58
f 57/139/10 22/140/34 15/141/53
f 25/142/32 58/143/33 49/144/1
f 20/145/37 60/146/29 9/147/58
f 77/148/31 66/149/51 29/150/61
f 52/151/62 28/152/63 67/153/41
f 12/154/47 46/155/46 36/156/13
f 9/157/58 23/158/64 42/159/59
f 6/160/65 68/161/40 35/162/50
f 19/163/38 44/164/12 71/165/11
f 12/166/47 36/167/13 10/168/36
f 30/169/25 77/170/31 29/171/61
f 68/172/40 69/173/43 27/174/56
f 65/175/4 64/176/6 59/177/52
f 39/178/66 13/179/67 24/180/68
f 28/181/63 55/182/35 67/183/41
f 30/184/25 29/185/61 72/186/69
f 1/187/30 14/188/44 2/189/20
f 17/190/70 6/191/65 78/192/42
f 73/193/54 15/194/53 58/195/33
f 9/196/58 60/197/29 23/198/64
f 32/199/48 7/200/21 74/201/71
f 49/202/1 15/203/53 47/204/2
f 20/205/37 18/206/27 60/207/29
f 34/208/14 11/209/72 54/210/17
f 43/211/18 52/212/62 61/213/19
f 32/214/48 74/215/71 21/216/73
f 20/217/37 8/218/26 19/219/38
f 8/220/26 30/221/25 72/222/69
f 68/223/40 26/224/49 69/225/43
f 66/226/51 32/227/48 21/228/73
f 64/229/6 57/230/10 73/231/54
f 53/232/45 40/233/74 7/234/21
f 56/235/75 17/236/70 22/237/34
f 11/238/72 24/239/68 43/240/18
f 59/241/52 64/242/6 50/243/55
f 39/244/66 24/245/68 11/246/72
f 6/247/65 35/248/50 78/249/42
f 12/250/47 38/251/15 46/252/46
f 26/253/49 19/254/38 71/255/11
f 53/256/45 39/257/66 40/258/74
f 21/259/73 74/260/71 33/261/16
f 1/262/30 45/263/24 14/264/44
f 3/265/57 68/266/40 6/267/65
f 24/268/68 37/269/76 43/270/18
f 7/271/21 40/272/74 34/273/14
f 76/274/5 56/275/75 57/276/10
f 40/277/74 11/278/72 34/279/14
f 19/280/38 8/281/26 44/282/12
f 36/283/13 4/284/23 71/285/11
f 21/286/73 33/287/16 12/288/47
f 29/289/61 66/290/51 21/291/73
f 29/292/61 21/293/73 5/294/77
f 8/295/26 72/296/69 44/297/12
f 61/298/19 52/299/62 27/300/56
f 40/301/74 39/302/66 11/303/72
f 42/304/59 41/305/78 13/306/67
f 61/307/19 27/308/56 69/309/43
f 74/310/71 34/311/14 33/312/16
f 72/313/69 29/314/61 5/315/77
f 52/316/62 67/317/41 27/318/56
f 49/319/1 70/320/3 28/321/63
f 63/322/60 3/323/57 6/324/65
f 42/325/59 13/326/67 39/327/66
f 72/328/69 5/329/77 10/330/36
f 23/331/64 51/332/7 16/333/9
f 63/334/60 6/335/65 17/336/70
f 44/337/12 72/338/69 10/339/36
f 63/340/60 56/341/75 76/342/5
f 45/343/24 1/344/30 30/345/25
f 43/346/18 37/347/76 52/348/62
f 27/349/56 67/350/41 35/351/50
f 37/352/76 49/353/1 28/354/63
f 5/355/77 21/356/73 12/357/47
f 7/358/21 34/359/14 74/360/71
f 45/361/24 9/362/58 14/363/44
f 56/364/75 22/365/34 57/366/10
f 23/367/64 16/368/9 41/369/78
f 37/370/76 28/371/63 52/372/62
f 10/373/36 5/374/77 12/375/47
f 68/376/40 18/377/27 26/378/49
f 41/379/78 25/380/32 13/381/67
f 38/382/15 54/383/17 4/384/23
f 41/385/78 16/386/9 25/387/32
f 62/388/8 73/389/54 58/390/33
f 60/391/29 51/392/7 23/393/64
f 11/394/72 43/395/18 54/396/17
f 46/397/46 4/398/23 36/399/13
f 28/400/63 70/401/3 55/402/35
f 3/403/57 63/404/60 65/405/4
f 48/406/39 65/407/4 31/408/28
f 16/409/9 62/410/8 25/411/32
f 25/412/32 49/413/1 37/414/76
f 14/415/44 42/416/59 53/417/45
f 18/418/27 48/419/39 31/420/28
f 24/421/68 25/422/32 37/423/76
f 42/424/59 23/425/64 41/426/78
f 63/427/60 17/428/70 56/429/75
f 13/430/67 25/431/32 24/432/68
f 53/433/45 42/434/59 39/435/66
f 17/436/70 55/437/35 22/438/34
f 58/439/33 15/440/53 49/441/1
f 62/442/8 50/443/55 73/444/54
f 59/445/52 50/446/55 62/447/8
f 34/448/14 54/449/17 38/450/15
f 17/451/70 78/452/42 55/453/35
f 22/454/34 70/455/3 15/456/53

View file

@ -0,0 +1,2 @@
# Blender3D MTL File:
# Material Count: 0

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
# Blender3D MTL File:
# Material Count: 1
newmtl (null).002
Ns 92.156863
Ka 0.000000 0.000000 0.000000
Kd 0.512000 0.512000 0.512000
Ks 0.250000 0.250000 0.250000
Ni 1.000000
d 1.000000
illum 2

View file

@ -0,0 +1,510 @@
# Blender3D v245 OBJ File:
# www.blender3d.org
mtllib stone2.mtl
o Cube_Cube.001_(null)_
v 0.890055 2.165081 0.986172
v 1.431306 0.970635 0.163109
v 0.633482 1.428586 -0.055412
v -0.575845 -0.466282 -0.451977
v -0.640681 -0.668567 0.596235
v -1.184195 0.004126 -0.448073
v 0.619197 3.943646 2.908859
v 1.002813 1.537048 3.382958
v 0.414865 3.747046 0.818572
v -3.385266 0.445788 -0.542142
v -3.775949 0.424655 -0.295611
v 0.852308 0.100392 3.785929
v 1.108309 -0.132653 3.010480
v 2.817891 0.218653 3.385422
v 0.580034 0.793794 -0.727416
v -0.920156 0.392708 -0.817262
v -3.103016 0.912680 -0.483351
v 0.059357 1.622479 0.078365
v 1.272019 0.576508 -0.170326
v -0.215426 -0.500157 3.611115
v -0.019301 0.205362 3.970237
v -0.689077 0.469057 3.572937
v 0.314494 -0.538300 3.670871
v 0.491842 -0.793157 3.099264
v 3.068897 0.192764 1.531024
v 3.381222 0.453218 1.962891
v -0.114144 1.250930 2.979363
v -1.088472 0.620336 1.710913
v -0.791054 -0.320624 2.331624
v 0.457342 -0.826928 1.417524
v 0.666721 0.421630 -0.782996
v 0.606740 -0.080083 -0.614301
v 1.381530 0.152128 0.294821
v -2.088201 0.240804 0.106231
v -1.385851 0.008243 0.438870
v -3.867162 0.708060 -0.150603
v -0.718038 1.247780 0.225421
v -3.347192 0.510607 0.002239
v 0.443070 3.517917 3.528996
v 3.107831 0.708007 2.649748
v 2.069237 0.671077 3.558883
v 2.978331 0.601025 0.522186
v 1.570974 1.325379 2.026118
v 0.304066 4.340722 1.763771
v 0.070780 3.725348 0.932229
v 0.236730 3.974768 3.078540
v 0.314434 1.181329 3.821141
v -0.137320 1.671206 1.332994
v 0.556358 -0.520332 0.065014
v 1.248736 -0.139805 1.593768
v -2.323394 0.775280 0.237771
v -1.535882 0.662075 0.797679
vt 0.291484 0.688325 0.0
vt 0.414126 0.686353 0.0
vt 0.314497 0.589421 0.0
vt 0.590958 0.368521 0.0
vt 0.725051 0.401789 0.0
vt 0.511012 0.305569 0.0
vt 0.626468 0.792472 0.0
vt 0.291484 0.688325 0.0
vt 0.176947 0.789344 0.0
vt 0.009231 0.664842 0.0
vt 0.291484 0.688325 0.0
vt 0.314497 0.589421 0.0
vt 0.422535 0.038374 0.0
vt 0.511012 0.305569 0.0
vt 0.448708 0.000000 0.0
vt 0.905357 0.752276 0.0
vt 0.870787 0.743165 0.0
vt 0.852090 0.983264 0.0
vt 0.356365 0.535240 0.0
vt 0.411221 0.332708 0.0
vt 0.350649 0.089096 0.0
vt 0.009231 0.664842 0.0
vt 0.314497 0.589421 0.0
vt 0.293395 0.528972 0.0
vt 0.447830 0.640703 0.0
vt 0.356365 0.535240 0.0
vt 0.314497 0.589421 0.0
vt 0.986569 0.594518 0.0
vt 0.903249 0.654467 0.0
vt 0.819365 0.560206 0.0
vt 1.000000 0.662379 0.0
vt 0.986569 0.594518 0.0
vt 0.988406 0.651964 0.0
vt 0.852090 0.983264 0.0
vt 0.679494 0.930917 0.0
vt 0.677989 0.996432 0.0
vt 0.819365 0.560206 0.0
vt 0.632976 0.626950 0.0
vt 0.614739 0.431087 0.0
vt 0.832549 0.470224 0.0
vt 0.819365 0.560206 0.0
vt 0.614739 0.431087 0.0
vt 0.832952 0.571445 0.0
vt 0.725051 0.401789 0.0
vt 0.590958 0.368521 0.0
vt 0.356365 0.535240 0.0
vt 0.447830 0.640703 0.0
vt 0.413607 0.533374 0.0
vt 0.513661 0.519660 0.0
vt 0.447830 0.640703 0.0
vt 0.563736 0.663566 0.0
vt 0.986569 0.594518 0.0
vt 1.000000 0.662379 0.0
vt 0.903249 0.654467 0.0
vt 0.522185 0.223888 0.0
vt 0.511012 0.305569 0.0
vt 0.594744 0.320181 0.0
vt 0.414887 0.002868 0.0
vt 0.368312 0.428109 0.0
vt 0.350649 0.089096 0.0
vt 0.448708 0.000000 0.0
vt 0.463895 0.069280 0.0
vt 0.414887 0.002868 0.0
vt 0.725051 0.401789 0.0
vt 0.832952 0.571445 0.0
vt 0.988406 0.651964 0.0
vt 0.314497 0.589421 0.0
vt 0.414126 0.686353 0.0
vt 0.447830 0.640703 0.0
vt 0.307208 0.783408 0.0
vt 0.626468 0.792472 0.0
vt 0.176947 0.789344 0.0
vt 0.700391 1.000000 0.0
vt 0.791041 0.909873 0.0
vt 0.852090 0.983264 0.0
vt 0.832549 0.470224 0.0
vt 0.725051 0.401789 0.0
vt 0.986569 0.594518 0.0
vt 0.511012 0.305569 0.0
vt 0.411221 0.332708 0.0
vt 0.590958 0.368521 0.0
vt 0.514278 0.885641 0.0
vt 0.414126 0.686353 0.0
vt 0.533426 0.796939 0.0
vt 0.832549 0.470224 0.0
vt 0.614739 0.431087 0.0
vt 0.594744 0.320181 0.0
vt 0.791041 0.909873 0.0
vt 0.533426 0.796939 0.0
vt 0.626468 0.792472 0.0
vt 0.000000 0.709595 0.0
vt 0.022892 0.626328 0.0
vt 0.187028 0.749991 0.0
vt 0.726303 0.716288 0.0
vt 0.632976 0.626950 0.0
vt 0.819365 0.560206 0.0
vt 0.293395 0.528972 0.0
vt 0.314497 0.589421 0.0
vt 0.368312 0.428109 0.0
vt 0.791041 0.909873 0.0
vt 0.726303 0.716288 0.0
vt 0.905357 0.752276 0.0
vt 0.903249 0.654467 0.0
vt 0.905357 0.752276 0.0
vt 0.726303 0.716288 0.0
vt 0.726303 0.716288 0.0
vt 0.791041 0.909873 0.0
vt 0.626468 0.792472 0.0
vt 0.022892 0.626328 0.0
vt 0.293395 0.528972 0.0
vt 0.404872 0.561889 0.0
vt 0.726303 0.716288 0.0
vt 0.307208 0.783408 0.0
vt 0.632976 0.626950 0.0
vt 0.187028 0.749991 0.0
vt 0.632976 0.626950 0.0
vt 0.307208 0.783408 0.0
vt 0.533426 0.796939 0.0
vt 0.291484 0.688325 0.0
vt 0.626468 0.792472 0.0
vt 0.677989 0.996432 0.0
vt 0.514278 0.885641 0.0
vt 0.700391 1.000000 0.0
vt 0.411221 0.332708 0.0
vt 0.422535 0.038374 0.0
vt 0.350649 0.089096 0.0
vt 0.988406 0.651964 0.0
vt 0.986569 0.594518 0.0
vt 0.725051 0.401789 0.0
vt 0.679494 0.930917 0.0
vt 0.514278 0.885641 0.0
vt 0.677989 0.996432 0.0
vt 0.307208 0.783408 0.0
vt 0.726303 0.716288 0.0
vt 0.626468 0.792472 0.0
vt 0.009231 0.664842 0.0
vt 0.293395 0.528972 0.0
vt 0.022892 0.626328 0.0
vt 0.563736 0.663566 0.0
vt 0.652333 0.531691 0.0
vt 0.513661 0.519660 0.0
vt 0.852090 0.983264 0.0
vt 0.791041 0.909873 0.0
vt 0.905357 0.752276 0.0
vt 0.447830 0.640703 0.0
vt 0.414126 0.686353 0.0
vt 0.514278 0.885641 0.0
vt 0.176947 0.789344 0.0
vt 0.291484 0.688325 0.0
vt 0.009231 0.664842 0.0
vt 0.736685 0.697104 0.0
vt 0.852090 0.983264 0.0
vt 0.870787 0.743165 0.0
vt 0.632976 0.626950 0.0
vt 0.368312 0.428109 0.0
vt 0.614739 0.431087 0.0
vt 0.414887 0.002868 0.0
vt 0.463895 0.069280 0.0
vt 0.444655 0.215048 0.0
vt 0.819365 0.560206 0.0
vt 0.832549 0.470224 0.0
vt 0.986569 0.594518 0.0
vt 0.736685 0.697104 0.0
vt 0.870787 0.743165 0.0
vt 0.988406 0.651964 0.0
vt 0.187028 0.749991 0.0
vt 0.176947 0.789344 0.0
vt 0.000000 0.709595 0.0
vt 0.022892 0.626328 0.0
vt 0.404872 0.561889 0.0
vt 0.187028 0.749991 0.0
vt 0.594744 0.320181 0.0
vt 0.614739 0.431087 0.0
vt 0.519192 0.335433 0.0
vt 0.903249 0.654467 0.0
vt 1.000000 0.662379 0.0
vt 0.905357 0.752276 0.0
vt 1.000000 0.662379 0.0
vt 0.988406 0.651964 0.0
vt 0.870787 0.743165 0.0
vt 0.870787 0.743165 0.0
vt 0.905357 0.752276 0.0
vt 1.000000 0.662379 0.0
vt 0.700391 1.000000 0.0
vt 0.514278 0.885641 0.0
vt 0.533426 0.796939 0.0
vt 0.422535 0.038374 0.0
vt 0.411221 0.332708 0.0
vt 0.511012 0.305569 0.0
vt 0.522185 0.223888 0.0
vt 0.448708 0.000000 0.0
vt 0.511012 0.305569 0.0
vt 0.652333 0.531691 0.0
vt 0.736685 0.697104 0.0
vt 0.832952 0.571445 0.0
vt 0.632976 0.626950 0.0
vt 0.404872 0.561889 0.0
vt 0.368312 0.428109 0.0
vt 0.852090 0.983264 0.0
vt 0.736685 0.697104 0.0
vt 0.679494 0.930917 0.0
vt 0.514278 0.885641 0.0
vt 0.563736 0.663566 0.0
vt 0.447830 0.640703 0.0
vt 0.736685 0.697104 0.0
vt 0.652333 0.531691 0.0
vt 0.563736 0.663566 0.0
vt 0.632976 0.626950 0.0
vt 0.187028 0.749991 0.0
vt 0.404872 0.561889 0.0
vt 0.422535 0.038374 0.0
vt 0.414887 0.002868 0.0
vt 0.350649 0.089096 0.0
vt 0.988406 0.651964 0.0
vt 0.832952 0.571445 0.0
vt 0.736685 0.697104 0.0
vt 0.522185 0.223888 0.0
vt 0.594744 0.320181 0.0
vt 0.519192 0.335433 0.0
vt 0.614739 0.431087 0.0
vt 0.368312 0.428109 0.0
vt 0.519192 0.335433 0.0
vt 0.414126 0.686353 0.0
vt 0.291484 0.688325 0.0
vt 0.533426 0.796939 0.0
vt 0.679494 0.930917 0.0
vt 0.563736 0.663566 0.0
vt 0.514278 0.885641 0.0
vt 0.414887 0.002868 0.0
vt 0.422535 0.038374 0.0
vt 0.448708 0.000000 0.0
vt 0.404872 0.561889 0.0
vt 0.293395 0.528972 0.0
vt 0.368312 0.428109 0.0
vt 0.519192 0.335433 0.0
vt 0.444655 0.215048 0.0
vt 0.522185 0.223888 0.0
vt 0.463895 0.069280 0.0
vt 0.522185 0.223888 0.0
vt 0.444655 0.215048 0.0
vt 0.314497 0.589421 0.0
vt 0.356365 0.535240 0.0
vt 0.350649 0.089096 0.0
vt 0.819365 0.560206 0.0
vt 0.903249 0.654467 0.0
vt 0.726303 0.716288 0.0
vt 0.000000 0.709595 0.0
vt 0.009231 0.664842 0.0
vt 0.022892 0.626328 0.0
vt 0.679494 0.930917 0.0
vt 0.736685 0.697104 0.0
vt 0.563736 0.663566 0.0
vt 0.176947 0.789344 0.0
vt 0.187028 0.749991 0.0
vt 0.307208 0.783408 0.0
vt 0.463895 0.069280 0.0
vt 0.448708 0.000000 0.0
vt 0.522185 0.223888 0.0
vt 0.447830 0.640703 0.0
vt 0.513661 0.519660 0.0
vt 0.413607 0.533374 0.0
vt 0.176947 0.789344 0.0
vt 0.009231 0.664842 0.0
vt 0.000000 0.709595 0.0
vt 0.725051 0.401789 0.0
vt 0.832549 0.470224 0.0
vt 0.594744 0.320181 0.0
vt 0.590958 0.368521 0.0
vt 0.652333 0.531691 0.0
vt 0.832952 0.571445 0.0
vt 0.852090 0.983264 0.0
vt 0.677989 0.996432 0.0
vt 0.700391 1.000000 0.0
vt 0.413607 0.533374 0.0
vt 0.513661 0.519660 0.0
vt 0.411221 0.332708 0.0
vt 0.590958 0.368521 0.0
vt 0.411221 0.332708 0.0
vt 0.513661 0.519660 0.0
vt 0.350649 0.089096 0.0
vt 0.368312 0.428109 0.0
vt 0.314497 0.589421 0.0
vt 0.594744 0.320181 0.0
vt 0.511012 0.305569 0.0
vt 0.725051 0.401789 0.0
vt 0.444655 0.215048 0.0
vt 0.519192 0.335433 0.0
vt 0.368312 0.428109 0.0
vt 0.700391 1.000000 0.0
vt 0.533426 0.796939 0.0
vt 0.791041 0.909873 0.0
vt 0.590958 0.368521 0.0
vt 0.513661 0.519660 0.0
vt 0.652333 0.531691 0.0
vt 0.368312 0.428109 0.0
vt 0.414887 0.002868 0.0
vt 0.444655 0.215048 0.0
vt 0.411221 0.332708 0.0
vt 0.356365 0.535240 0.0
vt 0.413607 0.533374 0.0
vn 0.842982 0.498428 -0.202246
vn 0.536790 0.716300 -0.445814
vn 0.235908 0.643452 -0.728202
vn -0.205512 -0.793054 -0.573382
vn -0.389080 -0.919156 -0.060854
vn -0.344005 -0.861415 -0.373577
vn 0.741234 0.448744 0.499161
vn 0.730277 0.620563 0.285562
vn 0.395489 0.602008 -0.693625
vn -0.315134 -0.338939 -0.886441
vn -0.668447 -0.716910 -0.197943
vn 0.324595 -0.553758 0.766778
vn 0.484878 -0.840754 0.240761
vn 0.635212 -0.379498 0.672658
vn 0.291726 0.466292 -0.835109
vn -0.105838 -0.211585 -0.971587
vn -0.238319 0.775140 -0.585070
vn -0.630879 0.476119 -0.612598
vn 0.572192 -0.034913 -0.819330
vn -0.482620 -0.675558 0.557360
vn -0.192907 -0.088870 0.977172
vn -0.808161 0.167852 0.564501
vn 0.226051 -0.685385 0.692190
vn 0.297189 -0.923734 0.241585
vn 0.508530 -0.844325 -0.168676
vn 0.999084 -0.037690 0.019440
vn -0.863643 0.416211 0.284341
vn -0.896420 0.292093 0.333293
vn -0.829035 -0.515763 0.215918
vn 0.283975 -0.955596 -0.078555
vn 0.409650 -0.064058 -0.909970
vn 0.402753 -0.563219 -0.721488
vn 0.501358 -0.757378 -0.418317
vn -0.336467 -0.750328 0.569018
vn -0.696127 -0.663717 0.273568
vn -0.801538 0.498917 0.329508
vn -0.426862 0.875484 -0.226447
vn -0.277596 -0.410657 0.868465
vn 0.060579 0.420698 0.905148
vn 0.700522 0.637867 0.319926
vn 0.415143 0.593493 0.689474
vn 0.741661 0.095523 -0.663900
vn 0.552202 0.833674 0.000214
vn -0.040040 0.988952 -0.142521
vn -0.736900 0.479324 -0.476608
vn -0.531877 0.698111 0.479263
vn -0.256081 0.323801 0.910794
vn -0.849635 0.526353 -0.032289
vn 0.403088 -0.860134 -0.312449
vn 0.460799 -0.886319 -0.044984
vn -0.392651 0.193365 0.899106
vn -0.721274 0.232215 0.652516
usemtl (null).002
s 1
f 1/1/1 2/2/2 3/3/3
f 4/4/4 5/5/5 6/6/6
f 8/7/7 1/8/1 7/9/8
f 9/10/9 1/11/1 3/12/3
f 10/13/10 6/14/6 11/15/11
f 12/16/12 13/17/13 14/18/14
f 15/19/15 16/20/16 17/21/17
f 9/22/9 3/23/3 18/24/18
f 19/25/19 15/26/15 3/27/3
f 20/28/20 21/29/21 22/30/22
f 23/31/23 20/32/20 24/33/24
f 14/34/14 25/35/25 26/36/26
f 22/37/22 27/38/27 28/39/28
f 29/40/29 22/41/22 28/42/28
f 30/43/30 5/44/5 4/45/4
f 15/46/15 19/47/19 31/48/31
f 32/49/32 19/50/19 33/51/33
f 20/52/20 23/53/23 21/54/21
f 34/55/34 6/56/6 35/57/35
f 36/58/36 37/59/37 17/60/17
f 11/61/11 38/62/38 36/63/36
f 5/64/5 30/65/30 24/66/24
f 3/67/3 2/68/2 19/69/19
f 39/70/39 8/71/7 7/72/8
f 40/73/40 41/74/41 14/75/14
f 29/76/29 5/77/5 20/78/20
f 6/79/6 16/80/16 4/81/4
f 42/82/42 2/83/2 43/84/43
f 29/85/29 28/86/28 35/87/35
f 41/88/41 43/89/43 8/90/7
f 44/91/44 45/92/45 46/93/46
f 47/94/47 27/95/27 22/96/22
f 18/97/18 3/98/3 37/99/37
f 41/100/41 47/101/47 12/102/12
f 21/103/21 12/104/12 47/105/47
f 47/106/47 41/107/41 8/108/7
f 45/109/45 18/110/18 48/111/48
f 47/112/47 39/113/39 27/114/27
f 46/115/46 27/116/27 39/117/39
f 43/118/43 1/119/1 8/120/7
f 26/121/26 42/122/42 40/123/40
f 16/124/16 10/125/10 17/126/17
f 24/127/24 20/128/20 5/129/5
f 25/130/25 42/131/42 26/132/26
f 39/133/39 47/134/47 8/135/7
f 9/136/9 18/137/18 45/138/45
f 33/139/33 49/140/49 32/141/32
f 14/142/14 41/143/41 12/144/12
f 19/145/19 2/146/2 42/147/42
f 7/148/8 1/149/1 9/150/9
f 50/151/50 14/152/14 13/153/13
f 27/154/27 37/155/37 28/156/28
f 36/157/36 38/158/38 51/159/51
f 22/160/22 29/161/29 20/162/20
f 50/163/50 13/164/13 24/165/24
f 46/166/46 7/167/8 44/168/44
f 45/169/45 48/170/48 46/171/46
f 35/172/35 28/173/28 52/174/52
f 21/175/21 23/176/23 12/177/12
f 23/178/23 24/179/24 13/180/13
f 13/181/13 12/182/12 23/183/23
f 40/184/40 42/185/42 43/186/43
f 10/187/10 16/188/16 6/189/6
f 34/190/34 11/191/11 6/192/6
f 49/193/49 50/194/50 30/195/30
f 27/196/27 48/197/48 37/198/37
f 14/199/14 50/200/50 25/201/25
f 42/202/42 33/203/33 19/204/19
f 50/205/50 49/206/49 33/207/33
f 27/208/27 46/209/46 48/210/48
f 10/211/10 36/212/36 17/213/17
f 24/214/24 30/215/30 50/216/50
f 34/217/34 35/218/35 52/219/52
f 28/220/28 37/221/37 52/222/52
f 2/223/2 1/224/1 43/225/43
f 25/226/25 33/227/33 42/228/42
f 36/229/36 10/230/10 11/231/11
f 48/232/48 18/233/18 37/234/37
f 52/235/52 51/236/51 34/237/34
f 38/238/38 34/239/34 51/240/51
f 3/241/3 15/242/15 17/243/17
f 22/244/22 21/245/21 47/246/47
f 44/247/44 9/248/9 45/249/45
f 25/250/25 50/251/50 33/252/33
f 7/253/8 46/254/46 39/255/39
f 38/256/38 11/257/11 34/258/34
f 19/259/19 32/260/32 31/261/31
f 7/262/8 9/263/9 44/264/44
f 5/265/5 29/266/29 35/267/35
f 4/268/4 49/269/49 30/270/30
f 14/271/14 26/272/26 40/273/40
f 31/274/31 32/275/32 16/276/16
f 4/277/4 16/278/16 32/279/32
f 17/280/17 37/281/37 3/282/3
f 35/283/35 6/284/6 5/285/5
f 51/286/51 52/287/52 37/288/37
f 40/289/40 43/290/43 41/291/41
f 4/292/4 32/293/32 49/294/49
f 37/295/37 36/296/36 51/297/51
f 16/298/16 15/299/15 31/300/31

View file

@ -0,0 +1,12 @@
# Blender3D MTL File:
# Material Count: 1
newmtl (null).001
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

View file

@ -0,0 +1,900 @@
# Blender3D v245 OBJ File:
# www.blender3d.org
mtllib stone3.mtl
o Cube_Cube.001_(nu
v 0.832831 1.525211 -2.413989
v -1.353834 0.358397 -2.285512
v -2.051713 -0.817718 0.142530
v -4.357436 -0.417947 -0.006574
v -2.946538 -0.386128 -0.710263
v 0.106201 1.843652 0.936821
v -1.572436 -1.688220 2.847615
v -1.368643 1.141404 2.282093
v 0.278426 1.119814 1.552663
v -0.357617 1.864839 -1.835575
v -0.810824 -1.060757 -3.447134
v 0.005773 3.717181 -1.106727
v 0.222799 -1.591150 2.650669
v -2.878387 -0.359198 0.205872
v -0.924663 1.330733 -1.095571
v -0.791475 -0.681381 1.256330
v 0.868475 -1.503788 2.247556
v 0.287325 -1.305202 2.096720
v -2.535922 -1.060727 -0.699519
v 0.439610 0.351503 1.198195
v 0.861597 3.857846 -1.515756
v -1.784253 0.408921 -1.411210
v 0.179917 1.674646 -1.169557
v -1.378108 1.814625 1.217977
v -1.394658 -0.567637 3.975168
v -2.085674 0.038423 3.277760
v 1.192997 -0.753839 -2.300407
v 1.102582 1.303922 -2.234298
v -1.557637 0.666711 3.883076
v -4.127615 -1.044222 -0.393041
v 0.129891 -1.033345 3.456703
v -0.073781 -0.360870 3.872209
v -0.229033 0.655734 3.873645
v 0.496849 4.268905 -1.152812
v -0.520859 1.312572 -0.633367
v -2.280533 -0.078188 0.567396
v 0.456202 -1.045721 2.666723
v -1.817994 -0.921540 3.652842
v -2.509533 0.316173 0.122538
v -1.845170 -1.186608 -0.526993
v -0.530664 -0.595032 -3.614444
v 1.276966 -0.255456 -3.165099
v -3.000615 0.119614 -0.271773
v -0.520364 -0.476490 4.015321
v 0.714036 -0.705916 1.766521
v -0.489116 0.627409 -3.611194
v 1.392642 -0.502676 1.735264
v -1.984672 1.712682 0.875934
v 0.238676 3.947514 -1.500106
v -1.712733 -0.574971 0.874162
v 0.151915 1.641363 -2.369212
v -1.106527 -0.417930 -3.455402
v -1.144393 -1.061155 3.867298
v -1.949623 -0.690357 1.764438
v 0.868263 1.463974 -1.681102
v -1.142671 1.132413 -2.990453
v 0.492936 1.284102 -3.305598
v 0.136735 0.911605 -0.701091
v 0.127060 0.156368 3.523527
v 2.015703 -0.756375 1.563004
v -4.700391 -0.592773 -0.308038
v -4.468536 -0.899966 -0.023245
v -0.847603 0.831205 3.381419
v 0.972485 -0.985061 -3.524362
v 0.318790 0.337340 -0.637879
v -1.888607 0.692692 2.677650
v -2.156087 0.795884 1.463593
v 0.325761 -0.260079 1.443236
v 0.207917 0.482820 2.703526
v 0.778710 -0.417718 2.217385
v 0.053725 -1.011766 -1.028449
v -1.142834 1.082117 -1.873498
v -0.389895 -1.209977 -3.328553
v -1.863830 -0.864048 -1.174631
v -1.289396 -0.842177 -2.084226
v -0.348576 -1.164066 3.735086
v -1.504812 1.796260 0.567420
v 0.420659 -1.253514 -2.837608
v 1.004338 -1.079156 -2.251697
v 0.044943 -0.439547 0.910305
v -0.516672 -1.236515 -0.802970
v 0.509186 0.150097 1.863457
v 0.250615 -0.571410 -0.898781
v -2.025194 -1.372968 2.834193
v 1.954467 -1.729702 1.760053
v -0.221379 2.014777 -1.269795
v 1.110527 0.983311 -3.443955
v -1.016692 0.839461 -3.402599
v -0.070330 0.752537 2.699474
v -2.213508 1.071437 -0.474236
v -0.613676 1.239859 -3.349030
vt 0.984832 0.692196 0.0
vt 0.990751 0.868886 0.0
vt 0.903139 0.714470 0.0
vt 0.711365 0.352919 0.0
vt 0.808137 0.573101 0.0
vt 0.729084 0.619823 0.0
vt 0.638002 0.130845 0.0
vt 0.524223 0.168698 0.0
vt 0.588154 0.205450 0.0
vt 0.543133 0.615741 0.0
vt 0.351906 0.361412 0.0
vt 0.343695 0.437639 0.0
vt 0.150148 0.078131 0.0
vt 0.196136 0.021569 0.0
vt 0.221518 0.054113 0.0
vt 0.529843 0.762425 0.0
vt 0.343695 0.437639 0.0
vt 0.359146 0.560369 0.0
vt 1.000000 0.663418 0.0
vt 0.989172 0.773649 0.0
vt 0.990751 0.868886 0.0
vt 0.893517 0.022364 0.0
vt 0.886573 0.000000 0.0
vt 0.824023 0.004411 0.0
vt 0.530167 0.848474 0.0
vt 0.529843 0.762425 0.0
vt 0.359146 0.560369 0.0
vt 0.848924 0.915733 0.0
vt 0.792440 0.950770 0.0
vt 0.859965 1.000000 0.0
vt 0.903139 0.714470 0.0
vt 0.990751 0.868886 0.0
vt 0.870758 0.904660 0.0
vt 0.203963 0.869807 0.0
vt 0.314226 0.622974 0.0
vt 0.196950 0.618772 0.0
vt 0.343695 0.437639 0.0
vt 0.137617 0.324455 0.0
vt 0.112959 0.370259 0.0
vt 0.299753 0.519351 0.0
vt 0.197817 0.493704 0.0
vt 0.376047 0.360012 0.0
vt 0.431023 0.486145 0.0
vt 0.376047 0.360012 0.0
vt 0.619904 0.395356 0.0
vt 0.886573 0.000000 0.0
vt 0.893517 0.022364 0.0
vt 0.882283 0.082474 0.0
vt 0.680126 0.777901 0.0
vt 0.790528 0.827538 0.0
vt 0.703646 0.699380 0.0
vt 0.524223 0.168698 0.0
vt 0.377525 0.135002 0.0
vt 0.167402 0.061303 0.0
vt 0.314226 0.622974 0.0
vt 0.273982 0.910828 0.0
vt 0.342060 0.605810 0.0
vt 0.577613 0.858007 0.0
vt 0.727289 0.904814 0.0
vt 0.590039 0.817970 0.0
vt 0.824023 0.004411 0.0
vt 0.674238 0.154733 0.0
vt 0.638002 0.130845 0.0
vt 0.328899 0.812246 0.0
vt 0.342060 0.605810 0.0
vt 0.273982 0.910828 0.0
vt 0.266043 0.817774 0.0
vt 0.127282 0.545961 0.0
vt 0.197817 0.493704 0.0
vt 0.940756 0.514316 0.0
vt 0.824124 0.478961 0.0
vt 0.899153 0.530161 0.0
vt 0.577613 0.858007 0.0
vt 0.529843 0.762425 0.0
vt 0.530167 0.848474 0.0
vt 0.167402 0.061303 0.0
vt 0.588154 0.205450 0.0
vt 0.524223 0.168698 0.0
vt 0.196950 0.618772 0.0
vt 0.314226 0.622974 0.0
vt 0.368242 0.591939 0.0
vt 0.792440 0.950770 0.0
vt 0.848924 0.915733 0.0
vt 0.790528 0.827538 0.0
vt 0.342060 0.605810 0.0
vt 0.328899 0.812246 0.0
vt 0.299753 0.519351 0.0
vt 0.674238 0.154733 0.0
vt 0.824023 0.004411 0.0
vt 0.886573 0.000000 0.0
vt 0.266043 0.817774 0.0
vt 0.197817 0.493704 0.0
vt 0.299753 0.519351 0.0
vt 0.899153 0.530161 0.0
vt 0.660333 0.543735 0.0
vt 0.641052 0.676996 0.0
vt 0.859965 1.000000 0.0
vt 0.870758 0.904660 0.0
vt 0.990751 0.868886 0.0
vt 0.808137 0.573101 0.0
vt 0.984832 0.692196 0.0
vt 0.729084 0.619823 0.0
vt 0.660333 0.543735 0.0
vt 0.543133 0.615741 0.0
vt 0.641052 0.676996 0.0
vt 0.680126 0.777901 0.0
vt 0.601272 0.825655 0.0
vt 0.701624 0.906672 0.0
vt 0.703646 0.699380 0.0
vt 0.641052 0.676996 0.0
vt 0.600068 0.731260 0.0
vt 0.221518 0.054113 0.0
vt 0.358755 0.225590 0.0
vt 0.264756 0.250252 0.0
vt 0.824023 0.004411 0.0
vt 0.638002 0.130845 0.0
vt 0.588154 0.205450 0.0
vt 0.734871 0.382888 0.0
vt 0.711365 0.352919 0.0
vt 0.758557 0.258288 0.0
vt 0.013789 0.199791 0.0
vt 0.141262 0.202490 0.0
vt 0.000000 0.414885 0.0
vt 0.368242 0.591939 0.0
vt 0.359146 0.560369 0.0
vt 0.343695 0.437639 0.0
vt 0.196950 0.618772 0.0
vt 0.119708 0.569752 0.0
vt 0.203963 0.869807 0.0
vt 0.824023 0.004411 0.0
vt 0.588154 0.205450 0.0
vt 0.893517 0.022364 0.0
vt 0.893517 0.022364 0.0
vt 0.588154 0.205450 0.0
vt 0.673368 0.289677 0.0
vt 0.563977 0.744613 0.0
vt 0.567914 0.716213 0.0
vt 0.590039 0.817970 0.0
vt 0.711954 0.422589 0.0
vt 0.660333 0.543735 0.0
vt 0.824124 0.478961 0.0
vt 0.137617 0.324455 0.0
vt 0.431039 0.305363 0.0
vt 0.137157 0.188690 0.0
vt 0.870758 0.904660 0.0
vt 0.811082 0.769957 0.0
vt 0.903139 0.714470 0.0
vt 0.619904 0.395356 0.0
vt 0.729084 0.619823 0.0
vt 0.651141 0.644429 0.0
vt 0.196950 0.618772 0.0
vt 0.112959 0.370259 0.0
vt 0.119708 0.569752 0.0
vt 0.141262 0.202490 0.0
vt 0.013789 0.199791 0.0
vt 0.150148 0.078131 0.0
vt 0.907303 0.874335 0.0
vt 0.848924 0.915733 0.0
vt 0.859965 1.000000 0.0
vt 0.701624 0.906672 0.0
vt 0.792440 0.950770 0.0
vt 0.790528 0.827538 0.0
vt 0.431039 0.305363 0.0
vt 0.351906 0.361412 0.0
vt 0.543133 0.615741 0.0
vt 0.266043 0.817774 0.0
vt 0.273982 0.910828 0.0
vt 0.203963 0.869807 0.0
vt 0.567914 0.716213 0.0
vt 0.641052 0.676996 0.0
vt 0.543133 0.615741 0.0
vt 0.619904 0.395356 0.0
vt 0.487559 0.277194 0.0
vt 0.674238 0.154733 0.0
vt 0.989172 0.773649 0.0
vt 1.000000 0.663418 0.0
vt 0.956056 0.739264 0.0
vt 0.701624 0.906672 0.0
vt 0.790528 0.827538 0.0
vt 0.680126 0.777901 0.0
vt 0.437579 0.572302 0.0
vt 0.530167 0.848474 0.0
vt 0.368242 0.591939 0.0
vt 0.882283 0.082474 0.0
vt 0.758557 0.258288 0.0
vt 0.711365 0.352919 0.0
vt 0.530167 0.848474 0.0
vt 0.727289 0.904814 0.0
vt 0.577613 0.858007 0.0
vt 0.893517 0.022364 0.0
vt 0.673368 0.289677 0.0
vt 0.758557 0.258288 0.0
vt 0.701624 0.906672 0.0
vt 0.859965 1.000000 0.0
vt 0.792440 0.950770 0.0
vt 0.358755 0.225590 0.0
vt 0.376047 0.360012 0.0
vt 0.264756 0.250252 0.0
vt 0.212691 0.191828 0.0
vt 0.221518 0.054113 0.0
vt 0.264756 0.250252 0.0
vt 0.641052 0.676996 0.0
vt 0.703646 0.699380 0.0
vt 0.899153 0.530161 0.0
vt 0.273982 0.910828 0.0
vt 0.266043 0.817774 0.0
vt 0.328899 0.812246 0.0
vt 0.212691 0.191828 0.0
vt 0.264756 0.250252 0.0
vt 0.176930 0.276981 0.0
vt 0.893517 0.022364 0.0
vt 0.758557 0.258288 0.0
vt 0.882283 0.082474 0.0
vt 0.720997 0.243934 0.0
vt 0.619904 0.395356 0.0
vt 0.674238 0.154733 0.0
vt 0.221518 0.054113 0.0
vt 0.212691 0.191828 0.0
vt 0.141262 0.202490 0.0
vt 0.221518 0.054113 0.0
vt 0.377525 0.135002 0.0
vt 0.358755 0.225590 0.0
vt 0.882283 0.082474 0.0
vt 0.711365 0.352919 0.0
vt 0.720997 0.243934 0.0
vt 0.956056 0.739264 0.0
vt 0.899153 0.530161 0.0
vt 0.865538 0.795356 0.0
vt 0.619904 0.395356 0.0
vt 0.711365 0.352919 0.0
vt 0.729084 0.619823 0.0
vt 0.016671 0.338741 0.0
vt 0.013789 0.199791 0.0
vt 0.000000 0.414885 0.0
vt 0.711365 0.352919 0.0
vt 0.619904 0.395356 0.0
vt 0.720997 0.243934 0.0
vt 0.376047 0.360012 0.0
vt 0.176930 0.276981 0.0
vt 0.264756 0.250252 0.0
vt 0.824124 0.478961 0.0
vt 0.734871 0.382888 0.0
vt 0.711954 0.422589 0.0
vt 0.720997 0.243934 0.0
vt 0.674238 0.154733 0.0
vt 0.886573 0.000000 0.0
vt 0.000000 0.414885 0.0
vt 0.127282 0.545961 0.0
vt 0.119708 0.569752 0.0
vt 0.882283 0.082474 0.0
vt 0.720997 0.243934 0.0
vt 0.886573 0.000000 0.0
vt 0.196136 0.021569 0.0
vt 0.013789 0.199791 0.0
vt 0.167402 0.061303 0.0
vt 0.808137 0.573101 0.0
vt 0.711365 0.352919 0.0
vt 0.734871 0.382888 0.0
vt 0.811082 0.769957 0.0
vt 0.703363 0.725738 0.0
vt 0.903139 0.714470 0.0
vt 0.674238 0.154733 0.0
vt 0.487559 0.277194 0.0
vt 0.524223 0.168698 0.0
vt 0.487559 0.277194 0.0
vt 0.377525 0.135002 0.0
vt 0.524223 0.168698 0.0
vt 0.137617 0.324455 0.0
vt 0.343695 0.437639 0.0
vt 0.351906 0.361412 0.0
vt 0.137157 0.188690 0.0
vt 0.112959 0.370259 0.0
vt 0.137617 0.324455 0.0
vt 0.119708 0.569752 0.0
vt 0.127282 0.545961 0.0
vt 0.203963 0.869807 0.0
vt 0.711954 0.422589 0.0
vt 0.734871 0.382888 0.0
vt 0.673368 0.289677 0.0
vt 0.590039 0.817970 0.0
vt 0.701624 0.906672 0.0
vt 0.601272 0.825655 0.0
vt 0.641052 0.676996 0.0
vt 0.567914 0.716213 0.0
vt 0.563977 0.744613 0.0
vt 0.431039 0.305363 0.0
vt 0.137617 0.324455 0.0
vt 0.351906 0.361412 0.0
vt 0.567914 0.716213 0.0
vt 0.543133 0.615741 0.0
vt 0.529843 0.762425 0.0
vt 0.119708 0.569752 0.0
vt 0.112959 0.370259 0.0
vt 0.016671 0.338741 0.0
vt 0.703363 0.725738 0.0
vt 0.530167 0.848474 0.0
vt 0.651141 0.644429 0.0
vt 0.314226 0.622974 0.0
vt 0.437579 0.572302 0.0
vt 0.368242 0.591939 0.0
vt 0.530167 0.848474 0.0
vt 0.703363 0.725738 0.0
vt 0.811082 0.769957 0.0
vt 0.703646 0.699380 0.0
vt 0.865538 0.795356 0.0
vt 0.899153 0.530161 0.0
vt 0.119708 0.569752 0.0
vt 0.016671 0.338741 0.0
vt 0.000000 0.414885 0.0
vt 0.758557 0.258288 0.0
vt 0.673368 0.289677 0.0
vt 0.734871 0.382888 0.0
vt 0.711954 0.422589 0.0
vt 0.673368 0.289677 0.0
vt 0.543133 0.615741 0.0
vt 0.577613 0.858007 0.0
vt 0.590039 0.817970 0.0
vt 0.567914 0.716213 0.0
vt 0.197817 0.493704 0.0
vt 0.176930 0.276981 0.0
vt 0.376047 0.360012 0.0
vt 0.990751 0.868886 0.0
vt 0.984832 0.692196 0.0
vt 1.000000 0.663418 0.0
vt 0.197817 0.493704 0.0
vt 0.072871 0.396689 0.0
vt 0.176930 0.276981 0.0
vt 0.680126 0.777901 0.0
vt 0.600068 0.731260 0.0
vt 0.601272 0.825655 0.0
vt 0.899153 0.530161 0.0
vt 0.824124 0.478961 0.0
vt 0.660333 0.543735 0.0
vt 0.600068 0.731260 0.0
vt 0.446370 0.767887 0.0
vt 0.601272 0.825655 0.0
vt 0.416692 0.849224 0.0
vt 0.601272 0.825655 0.0
vt 0.446370 0.767887 0.0
vt 0.984832 0.692196 0.0
vt 0.940756 0.514316 0.0
vt 1.000000 0.663418 0.0
vt 0.487559 0.277194 0.0
vt 0.376047 0.360012 0.0
vt 0.358755 0.225590 0.0
vt 0.903139 0.714470 0.0
vt 0.729084 0.619823 0.0
vt 0.984832 0.692196 0.0
vt 0.343695 0.437639 0.0
vt 0.529843 0.762425 0.0
vt 0.543133 0.615741 0.0
vt 0.368242 0.591939 0.0
vt 0.530167 0.848474 0.0
vt 0.359146 0.560369 0.0
vt 0.790528 0.827538 0.0
vt 0.865538 0.795356 0.0
vt 0.703646 0.699380 0.0
vt 0.984832 0.692196 0.0
vt 0.808137 0.573101 0.0
vt 0.940756 0.514316 0.0
vt 0.112959 0.370259 0.0
vt 0.013789 0.199791 0.0
vt 0.016671 0.338741 0.0
vt 0.377525 0.135002 0.0
vt 0.196136 0.021569 0.0
vt 0.167402 0.061303 0.0
vt 0.314226 0.622974 0.0
vt 0.342060 0.605810 0.0
vt 0.431023 0.486145 0.0
vt 0.377525 0.135002 0.0
vt 0.487559 0.277194 0.0
vt 0.358755 0.225590 0.0
vt 0.266043 0.817774 0.0
vt 0.299753 0.519351 0.0
vt 0.328899 0.812246 0.0
vt 0.196136 0.021569 0.0
vt 0.150148 0.078131 0.0
vt 0.013789 0.199791 0.0
vt 0.989172 0.773649 0.0
vt 0.907303 0.874335 0.0
vt 0.990751 0.868886 0.0
vt 0.127282 0.545961 0.0
vt 0.000000 0.414885 0.0
vt 0.072871 0.396689 0.0
vt 1.000000 0.663418 0.0
vt 0.899153 0.530161 0.0
vt 0.956056 0.739264 0.0
vt 0.711954 0.422589 0.0
vt 0.543133 0.615741 0.0
vt 0.660333 0.543735 0.0
vt 0.416692 0.849224 0.0
vt 0.641052 0.676996 0.0
vt 0.563977 0.744613 0.0
vt 0.811082 0.769957 0.0
vt 0.727289 0.904814 0.0
vt 0.530167 0.848474 0.0
vt 0.588154 0.205450 0.0
vt 0.431039 0.305363 0.0
vt 0.673368 0.289677 0.0
vt 0.013789 0.199791 0.0
vt 0.112959 0.370259 0.0
vt 0.137157 0.188690 0.0
vt 0.137157 0.188690 0.0
vt 0.167402 0.061303 0.0
vt 0.013789 0.199791 0.0
vt 0.674238 0.154733 0.0
vt 0.524223 0.168698 0.0
vt 0.638002 0.130845 0.0
vt 0.641052 0.676996 0.0
vt 0.446370 0.767887 0.0
vt 0.600068 0.731260 0.0
vt 0.903139 0.714470 0.0
vt 0.703363 0.725738 0.0
vt 0.729084 0.619823 0.0
vt 0.431023 0.486145 0.0
vt 0.619904 0.395356 0.0
vt 0.651141 0.644429 0.0
vt 0.734871 0.382888 0.0
vt 0.824124 0.478961 0.0
vt 0.808137 0.573101 0.0
vt 0.072871 0.396689 0.0
vt 0.000000 0.414885 0.0
vt 0.176930 0.276981 0.0
vt 0.203963 0.869807 0.0
vt 0.127282 0.545961 0.0
vt 0.266043 0.817774 0.0
vt 0.907303 0.874335 0.0
vt 0.865538 0.795356 0.0
vt 0.848924 0.915733 0.0
vt 0.446370 0.767887 0.0
vt 0.641052 0.676996 0.0
vt 0.416692 0.849224 0.0
vt 0.859965 1.000000 0.0
vt 0.727289 0.904814 0.0
vt 0.870758 0.904660 0.0
vt 0.197817 0.493704 0.0
vt 0.127282 0.545961 0.0
vt 0.072871 0.396689 0.0
vt 0.651141 0.644429 0.0
vt 0.437579 0.572302 0.0
vt 0.431023 0.486145 0.0
vt 0.790528 0.827538 0.0
vt 0.848924 0.915733 0.0
vt 0.865538 0.795356 0.0
vt 0.907303 0.874335 0.0
vt 0.989172 0.773649 0.0
vt 0.956056 0.739264 0.0
vt 1.000000 0.663418 0.0
vt 0.940756 0.514316 0.0
vt 0.899153 0.530161 0.0
vt 0.859965 1.000000 0.0
vt 0.990751 0.868886 0.0
vt 0.907303 0.874335 0.0
vt 0.416692 0.849224 0.0
vt 0.563977 0.744613 0.0
vt 0.493667 0.829344 0.0
vt 0.493667 0.829344 0.0
vt 0.563977 0.744613 0.0
vt 0.590039 0.817970 0.0
vt 0.368242 0.591939 0.0
vt 0.343695 0.437639 0.0
vt 0.196950 0.618772 0.0
vt 0.703363 0.725738 0.0
vt 0.651141 0.644429 0.0
vt 0.729084 0.619823 0.0
vt 0.343695 0.437639 0.0
vt 0.112959 0.370259 0.0
vt 0.196950 0.618772 0.0
vt 0.600068 0.731260 0.0
vt 0.680126 0.777901 0.0
vt 0.703646 0.699380 0.0
vt 0.619904 0.395356 0.0
vt 0.376047 0.360012 0.0
vt 0.487559 0.277194 0.0
vt 0.141262 0.202490 0.0
vt 0.150148 0.078131 0.0
vt 0.221518 0.054113 0.0
vt 0.376047 0.360012 0.0
vt 0.431023 0.486145 0.0
vt 0.299753 0.519351 0.0
vt 0.342060 0.605810 0.0
vt 0.299753 0.519351 0.0
vt 0.431023 0.486145 0.0
vt 0.273982 0.910828 0.0
vt 0.314226 0.622974 0.0
vt 0.203963 0.869807 0.0
vt 0.493667 0.829344 0.0
vt 0.590039 0.817970 0.0
vt 0.601272 0.825655 0.0
vt 0.859965 1.000000 0.0
vt 0.701624 0.906672 0.0
vt 0.727289 0.904814 0.0
vt 0.416692 0.849224 0.0
vt 0.493667 0.829344 0.0
vt 0.601272 0.825655 0.0
vt 0.567914 0.716213 0.0
vt 0.529843 0.762425 0.0
vt 0.577613 0.858007 0.0
vt 0.176930 0.276981 0.0
vt 0.000000 0.414885 0.0
vt 0.141262 0.202490 0.0
vt 0.212691 0.191828 0.0
vt 0.176930 0.276981 0.0
vt 0.141262 0.202490 0.0
vt 0.701624 0.906672 0.0
vt 0.590039 0.817970 0.0
vt 0.727289 0.904814 0.0
vt 0.824124 0.478961 0.0
vt 0.940756 0.514316 0.0
vt 0.808137 0.573101 0.0
vt 0.673368 0.289677 0.0
vt 0.431039 0.305363 0.0
vt 0.543133 0.615741 0.0
vt 0.167402 0.061303 0.0
vt 0.431039 0.305363 0.0
vt 0.588154 0.205450 0.0
vt 0.431039 0.305363 0.0
vt 0.167402 0.061303 0.0
vt 0.137157 0.188690 0.0
vt 0.727289 0.904814 0.0
vt 0.811082 0.769957 0.0
vt 0.870758 0.904660 0.0
vt 0.437579 0.572302 0.0
vt 0.651141 0.644429 0.0
vt 0.530167 0.848474 0.0
vt 0.196136 0.021569 0.0
vt 0.377525 0.135002 0.0
vt 0.221518 0.054113 0.0
vt 0.431023 0.486145 0.0
vt 0.437579 0.572302 0.0
vt 0.314226 0.622974 0.0
vt 0.956056 0.739264 0.0
vt 0.865538 0.795356 0.0
vt 0.907303 0.874335 0.0
vn -0.926786 0.184576 0.327006
vn -0.447523 0.585345 0.676077
vn -0.520371 0.802240 0.292520
vn -0.694571 0.503098 0.514206
vn -0.993683 -0.023103 0.109531
vn -0.635365 0.767876 0.081362
vn -0.240303 -0.589740 -0.770989
vn -0.554369 -0.533403 -0.638844
vn -0.194403 -0.978423 -0.069521
vn 0.516892 -0.844997 -0.136876
vn 0.691549 -0.638600 0.337443
vn 0.991668 -0.122593 0.038942
vn -0.115024 -0.125675 -0.985351
vn -0.470595 -0.658193 -0.587573
vn -0.757653 -0.126377 -0.640278
vn 0.987304 -0.156926 0.024445
vn 0.927122 0.132450 -0.350505
vn -0.665761 -0.355541 0.655995
vn -0.295663 -0.125889 0.946928
vn -0.526200 -0.600940 0.601581
vn -0.912015 0.206610 -0.354259
vn -0.316660 -0.818079 -0.480026
vn 0.558977 0.827601 0.050478
vn 0.610950 -0.076327 0.787957
vn 0.922086 0.160375 0.352092
vn 0.453993 0.601642 0.657155
vn -0.093509 0.962340 0.255165
vn 0.875546 0.424879 -0.229865
vn 0.163854 0.452101 0.876766
vn 0.754662 0.080111 0.651173
vn 0.674245 -0.735405 0.067049
vn 0.884396 -0.463912 0.050783
vn -0.846828 0.456374 -0.273049
vn -0.263924 0.738304 -0.620655
vn -0.637928 0.726096 -0.256508
vn -0.292184 0.907163 0.302744
vn -0.728019 0.663594 -0.171941
vn -0.496414 0.574816 0.650472
vn 0.805414 -0.128971 0.578448
vn 0.833705 -0.250465 0.492080
vn 0.382916 -0.871792 0.305429
vn -0.801935 -0.533372 -0.269021
vn -0.383282 -0.846217 -0.370128
vn 0.051241 0.726981 0.684713
vn -0.549821 0.312510 0.774590
vn 0.976287 0.199133 0.084719
vn 0.556841 0.772912 0.304147
vn 0.796686 0.530412 -0.289712
vn -0.437239 0.190619 -0.878872
vn -0.736961 0.309305 0.600971
vn -0.489425 0.594256 -0.638173
vn 0.409314 0.649586 -0.640675
vn -0.828303 -0.559404 0.030152
vn -0.697348 -0.673177 -0.245949
vn -0.276803 -0.960814 0.012177
vn 0.875576 0.480178 0.052309
vn -0.085940 -0.899319 -0.428694
vn 0.150304 -0.683432 -0.714316
vn 0.679159 0.427259 0.596759
vn 0.890988 0.355480 0.282418
vn 0.327097 -0.769250 0.548845
vn -0.943114 0.173070 -0.283761
vn -0.725547 0.646901 -0.234626
vn -0.791681 -0.365490 0.489486
vn -0.354503 -0.020203 0.934812
vn 0.525620 -0.564806 -0.636128
vn -0.112094 0.175451 -0.978057
vn 0.631123 0.420911 -0.651509
vn 0.940916 0.292001 -0.171361
vn -0.237251 -0.701773 0.671682
vn 0.248146 -0.037141 -0.967986
vn 0.859035 -0.193396 -0.473952
vn -0.326090 -0.942503 0.072970
vn 0.190161 -0.943785 0.270333
vn 0.422193 -0.886349 -0.189947
vn -0.048219 0.918455 0.392560
vn -0.074190 0.972930 -0.218726
vn 0.148625 -0.116764 0.981964
vn -0.747215 0.130131 -0.651662
vn -0.133549 -0.572314 0.809046
vn 0.249001 0.948851 0.194067
vn -0.628773 0.287484 -0.722465
vn -0.252937 0.812922 -0.524522
vn -0.597003 0.771905 -0.218360
vn 0.274178 -0.630146 0.726402
vn 0.968902 -0.076815 -0.235115
vn -0.137242 0.938719 0.316141
vn 0.113010 0.781365 -0.613727
vn 0.167089 -0.985900 0.006317
vn 0.487014 0.685385 -0.541307
vn 0.366863 0.829005 -0.422010
usemtl (null).001
s 1
f 26/1/1 29/2/2 66/3/3
f 39/4/4 67/5/5 48/6/6
f 19/7/7 74/8/8 40/9/9
f 80/10/10 71/11/11 83/12/12
f 41/13/13 11/14/14 52/15/15
f 20/16/16 83/17/12 65/18/17
f 38/19/18 25/20/19 29/21/2
f 62/22/20 61/23/21 30/24/22
f 6/25/23 20/26/16 65/27/17
f 32/28/24 59/29/25 33/30/26
f 66/31/3 29/32/2 63/33/27
f 21/34/28 23/35/29 55/36/30
f 83/37/12 79/38/31 27/39/32
f 10/40/33 51/41/34 72/42/35
f 15/43/36 72/44/35 90/45/37
f 61/46/21 62/47/20 4/48/38
f 37/49/39 31/50/40 13/51/41
f 74/52/8 75/53/42 73/54/43
f 23/55/29 34/56/44 86/57/45
f 9/58/46 89/59/47 82/60/48
f 30/61/22 5/62/49 19/63/7
f 12/64/50 86/65/45 34/66/44
f 49/67/51 1/68/52 51/69/34
f 84/70/53 54/71/54 7/72/55
f 9/73/46 20/74/16 6/75/23
f 73/76/43 40/77/9 74/78/8
f 55/79/30 23/80/29 58/81/56
f 59/82/25 32/83/24 31/84/40
f 86/85/45 12/86/50 10/87/33
f 5/88/49 30/89/22 61/90/21
f 49/91/51 51/92/34 10/93/33
f 7/94/55 16/95/57 18/96/58
f 33/97/26 63/98/27 29/99/2
f 67/100/5 26/101/1 48/102/6
f 16/103/57 80/104/10 18/105/58
f 37/106/39 70/107/59 69/108/60
f 13/109/41 18/110/58 17/111/61
f 52/112/15 2/113/62 56/114/63
f 30/115/22 19/116/7 40/117/9
f 36/118/64 39/119/4 14/120/65
f 64/121/66 46/122/67 87/123/68
f 58/124/56 65/125/17 83/126/12
f 55/127/30 28/128/69 21/129/28
f 30/130/22 40/131/9 62/132/20
f 62/133/20 40/134/9 3/135/70
f 45/136/71 68/137/72 82/138/48
f 50/139/73 16/140/57 54/141/54
f 79/142/31 81/143/74 78/144/75
f 63/145/27 8/146/76 66/147/3
f 90/148/37 48/149/6 77/150/77
f 55/151/30 27/152/32 28/153/69
f 46/154/67 64/155/66 41/156/13
f 44/157/78 32/158/24 33/159/26
f 69/160/60 59/161/25 31/162/40
f 81/163/74 71/164/11 80/165/10
f 49/166/51 34/167/44 21/168/28
f 68/169/72 18/170/58 80/171/10
f 90/172/37 22/173/79 5/174/49
f 25/175/19 38/176/18 53/177/80
f 69/178/60 31/179/40 37/180/39
f 35/181/81 6/182/23 58/183/56
f 4/184/38 14/185/65 39/186/4
f 6/187/23 89/188/47 9/189/46
f 62/190/20 3/191/70 14/192/65
f 69/193/60 33/194/26 59/195/25
f 2/196/62 72/197/35 56/198/63
f 88/199/82 52/200/15 56/201/63
f 18/202/58 13/203/41 7/204/55
f 34/205/44 49/206/51 12/207/50
f 88/208/82 56/209/63 91/210/83
f 62/211/20 14/212/65 4/213/38
f 43/214/84 90/215/37 5/216/49
f 52/217/15 88/218/82 46/219/67
f 52/220/15 75/221/42 2/222/62
f 4/223/38 39/224/4 43/225/84
f 53/226/80 7/227/55 76/228/85
f 90/229/37 39/230/4 48/231/6
f 42/232/86 64/233/66 87/234/68
f 39/235/4 90/236/37 43/237/84
f 72/238/35 91/239/83 56/240/63
f 54/241/54 36/242/64 50/243/73
f 43/244/84 5/245/49 61/246/21
f 87/247/68 1/248/52 28/249/69
f 4/250/38 43/251/84 61/252/21
f 11/253/14 64/254/66 73/255/43
f 67/256/5 39/257/4 36/258/64
f 8/259/76 24/260/87 66/261/3
f 5/262/49 22/263/79 74/264/8
f 22/265/79 75/266/42 74/267/8
f 79/268/31 83/269/12 71/270/11
f 78/271/75 27/272/32 79/273/31
f 28/274/69 1/275/52 21/276/28
f 50/277/73 36/278/64 3/279/70
f 82/280/48 69/281/60 70/282/59
f 18/283/58 68/284/72 45/285/71
f 81/286/74 79/287/31 71/288/11
f 68/289/72 80/290/10 20/291/16
f 28/292/69 27/293/32 42/294/86
f 24/295/87 6/296/23 77/297/77
f 23/298/29 35/299/81 58/300/56
f 6/301/23 24/302/87 8/303/76
f 13/304/41 76/305/85 7/306/55
f 28/307/69 42/308/86 87/309/68
f 14/310/65 3/311/70 36/312/64
f 50/313/73 3/314/70 80/315/10
f 9/316/46 82/317/48 68/318/72
f 51/319/34 91/320/83 72/321/35
f 29/322/2 26/323/1 38/324/18
f 51/325/34 57/326/88 91/327/83
f 37/328/39 17/329/61 70/330/59
f 7/331/55 54/332/54 16/333/57
f 17/334/61 85/335/89 70/336/59
f 60/337/90 70/338/59 85/339/89
f 26/340/1 84/341/53 38/342/18
f 22/343/79 72/344/35 2/345/62
f 66/346/3 48/347/6 26/348/1
f 83/349/12 20/350/16 80/351/10
f 58/352/56 6/353/23 65/354/17
f 31/355/40 76/356/85 13/357/41
f 26/358/1 67/359/5 84/360/53
f 27/361/32 64/362/66 42/363/86
f 75/364/42 11/365/14 73/366/43
f 23/367/29 86/368/45 15/369/36
f 75/370/42 22/371/79 2/372/62
f 49/373/51 10/374/33 12/375/50
f 11/376/14 41/377/13 64/378/66
f 25/379/19 44/380/78 29/381/2
f 1/382/52 87/383/68 57/384/88
f 38/385/18 7/386/55 53/387/80
f 50/388/73 80/389/10 16/390/57
f 60/391/90 18/392/58 45/393/71
f 8/394/76 89/395/47 6/396/23
f 40/397/9 81/398/74 3/399/70
f 64/400/66 27/401/32 78/402/75
f 78/403/75 73/404/43 64/405/66
f 5/406/49 74/407/8 19/408/7
f 18/409/58 85/410/89 17/411/61
f 66/412/3 24/413/87 48/414/6
f 15/415/36 90/416/37 77/417/77
f 36/418/64 54/419/54 67/420/5
f 57/421/88 87/422/68 91/423/83
f 21/424/28 1/425/52 49/426/51
f 44/427/78 76/428/85 32/429/24
f 85/430/89 18/431/58 60/432/90
f 33/433/26 89/434/47 63/435/27
f 51/436/34 1/437/52 57/438/88
f 77/439/77 35/440/81 15/441/36
f 31/442/40 32/443/24 76/444/85
f 44/445/78 25/446/19 53/447/80
f 38/448/18 84/449/53 7/450/55
f 33/451/26 29/452/2 44/453/78
f 60/454/90 45/455/71 47/456/91
f 47/457/91 45/458/71 82/459/48
f 58/460/56 83/461/12 55/462/30
f 24/463/87 77/464/77 48/465/6
f 83/466/12 27/467/32 55/468/30
f 17/469/61 37/470/39 13/471/41
f 90/472/37 72/473/35 22/474/79
f 46/475/67 41/476/13 52/477/15
f 72/478/35 15/479/36 10/480/33
f 86/481/45 10/482/33 15/483/36
f 34/484/44 23/485/29 21/486/28
f 47/487/91 82/488/48 70/489/59
f 33/490/26 69/491/60 89/492/47
f 60/493/90 47/494/91 70/495/59
f 68/496/72 20/497/16 9/498/46
f 91/499/83 87/500/68 46/501/67
f 88/502/82 91/503/83 46/504/67
f 69/505/60 82/506/48 89/507/47
f 54/508/54 84/509/53 67/510/5
f 3/511/70 81/512/74 80/513/10
f 73/514/43 81/515/74 40/516/9
f 81/517/74 73/518/43 78/519/75
f 89/520/47 8/521/76 63/522/27
f 35/523/81 77/524/77 6/525/23
f 11/526/14 75/527/42 52/528/15
f 15/529/36 35/530/81 23/531/29
f 53/532/80 76/533/85 44/534/78

View file

@ -0,0 +1,12 @@
# Blender3D MTL File:
# Material Count: 1
newmtl T_Body
Ns 92.156863
Ka 0.000000 0.000000 0.000000
Kd 0.512000 0.512000 0.512000
Ks 0.250000 0.250000 0.250000
Ni 1.000000
d 1.000000
illum 2

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

69
plant-eyelids/message.ss Normal file
View file

@ -0,0 +1,69 @@
#lang scheme/base
(require scheme/class "list-utils.ss")
(provide (all-defined-out))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; a message for sending betwixt logic and view side
(define-serializable-class* message% object% ()
(init-field
(name 'none) ; a symbol denoting the type of the message
(data '())) ; should be an assoc list map of name to values, eg:
; '((name "archibold") (age 53))
; shouldn't put logic objects in here - 'raw' data only
(define/public (get-name)
name)
(define/public (get-data arg-name)
(cadr (assoc arg-name data)))
(define/public (print)
(printf "msg: ~a ~a~n" name data))
(define/public (to-string)
(string-append (symbol->string name) " " (nvpairs->string data "")))
(define/public (from-string str)
(let ((tokens (string-split str #\ )))
(set! name (string->symbol (car tokens)))
(set! data (string->nvpairs (list-string-concat (cdr tokens) " ") '()))))
(define (value->string a)
(cond
((number? a) (string-append "n:" (number->string a)))
((string? a) (string-append "s:" a))
((vector? a) (string-append "v:" (number->string (vector-ref a 0)) ","
(number->string (vector-ref a 1)) ","
(number->string (vector-ref a 2))))
((symbol? a) (string-append "y:" (symbol->string a)))
(else (error "unsupported arg type for " a))))
(define (nvpairs->string l s)
(cond
((null? l) s)
(else
(nvpairs->string (cdr l) (string-append s (symbol->string (caar l)) "="
(value->string (cadr (car l))) " ")))))
(define (string->value a)
(cond
((string=? (car a) "n") (string->number (cadr a)))
((string=? (car a) "s") (cadr a))
((string=? (car a) "v")
(let ((v (string-split (cadr a) #\,)))
(vector (string->number (list-ref v 0))
(string->number (list-ref v 1))
(string->number (list-ref v 2)))))
((string=? (car a) "y") (string->symbol (cadr a)))
(else (error "unsupported value type for " a))))
(define (string->nvpairs s l)
(map
(lambda (pair)
(let ((nv (string-split pair #\=)))
(list (string->symbol (car nv))
(string->value (string-split (cadr nv) #\:)))))
(string-split s #\ )))
(super-new))

2000
plant-eyelids/mymesh.obj Normal file

File diff suppressed because it is too large Load diff

BIN
plant-eyelids/picture.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

View file

@ -0,0 +1,343 @@
;#lang scheme/base
;(require fluxus-016/drflux)
(require scheme/class)
;=====================================================================
(clear)
(define (build-ring n sr er)
(let ((p (build-polygons (+ (* n 2) 2) 'triangle-strip)))
(with-primitive p
(pdata-index-map!
(lambda (i p)
(let ((a (* (/ (quotient i 2) n) (* 2 3.141)))
(s (* (if (odd? i) sr er) 5)))
(vector (* (cos a) s) (* (sin a) s) (if (odd? i) 0 5 ))))
"p")
(recalc-normals 1))
p))
(define camera (build-locator))
(define twig%
(class object%
(init-field
(size 100)
(radius 1)
(speed 0.2))
(field
(root (build-locator))
(child-twigs '())
(age 0)
(tx (mident))
(next-ring-time 0))
(define/public (build pos dir)
(with-primitive root
(translate pos)
(cond (dir
(concat (maim dir (vector 0 0 1)))
(rotate (vector 0 -90 0)))
(else (rotate (vmul (crndvec) 20))))))
(define/public (update t)
(for-each
(lambda (child)
(send child update t))
child-twigs)
(when (and (< age size) (< next-ring-time t))
(set! next-ring-time (+ t speed))
(let ((p (with-state
(parent root)
(hint-depth-sort)
(colour (vector 0.8 1 0.6))
(texture (load-texture "textures/skin.png"))
;(hint-none)
;(hint-wire)
(backfacecull 1)
(let* ((s (- size age))
(sr (* radius (/ s size)))
(er (* radius (/ (- s 1) size))))
(translate (vector 0 0 (* age 5)))
(when (zero? (random 3))
(with-state
(identity)
(set! child-twigs (cons
(make-object twig% (/ size 2) sr speed) child-twigs))
(send (car child-twigs) build (vector 0 0 (* age 5) ) #f)))
(build-ring 5 sr er)))))
(with-primitive camera (parent p)))
(set! age (+ age 1))))
(super-new)))
(define pickup%
(class object%
(init-field
(pos (vector 0 0 0)))
(field
(col (vmul (rndvec) 0.1))
(root (let ((p (with-state
(translate pos)
(hint-depth-sort)
(blend-mode 'src-alpha 'one)
(texture (load-texture "textures/particle.png"))
(build-particles 20))))
(with-primitive p
(pdata-add "vel" "v")
(pdata-map!
(lambda (vel)
(vmul (vector (crndf) (* 2 (rndf)) (crndf)) 0.02))
"vel")
(pdata-map!
(lambda (s)
(vector 2 2 2))
"s")
(pdata-map!
(lambda (c)
col)
"c"))
p)))
(define/public (get-pos)
pos)
(define/public (update t)
(with-primitive root
(pdata-op "+" "p" "vel")
(pdata-op "*" "c" 0.996)
(pdata-op "*" "s" 1.005)
(when (zero? (random 5))
(let ((reset (random (pdata-size))))
(pdata-set! "c" reset col)
(pdata-set! "p" reset (vector 0 0 0))
(pdata-set! "s" reset (vector 2 2 2))))))
(super-new)))
(define seed%
(class object%
(field
(twigs '())
(nutrients (let ((p (with-state
(hint-depth-sort)
(texture (load-texture "textures/particle.png"))
(build-particles 5000))))
(with-primitive p
(pdata-map!
(lambda (p)
(vmul (vadd (crndvec) (vector 0 -1 0)) 90))
"p")
(pdata-map!
(lambda (s)
(vector 1 1 1))
"s"))
p))
(pickups (build-list 1 (lambda (_)
(make-object pickup% (vmul (vsub (crndvec) (vector 0 1 0)) 50)))))
(indicator (let ((p (with-state
(hint-depth-sort)
;(blend-mode 'src-alpha 'one )
(texture (load-texture "textures/particle.png"))
(build-particles 200))))
(with-primitive p
(pdata-add "vel" "v")
(pdata-map!
(lambda (vel)
(srndvec))
"vel")
(pdata-map!
(lambda (c)
(vector 0 0 0.1))
"c")
(pdata-map!
(lambda (s)
(let ((sz (rndf)))
(vector sz sz sz)))
"s"))
p))
(debounce #t)
(debounce-time 0)
(pos (vector 0 0 0))
(root (with-state
(scale 5)
(translate pos)
(texture (load-texture "textures/skin.png"))
(backfacecull 0)
(opacity 0.6)
(colour (vector 0.8 1 0.6))
(hint-depth-sort)
(hint-unlit)
(load-primitive "meshes/seed.obj"))))
(define/public (add-twig dir)
(let ((t (make-object twig% 10 0.2 2)))
(set! twigs (cons (with-state
(colour (vector 0.3 0.8 0.4))
(send t build (vector 0 0 0) dir) t) twigs))))
(define/public (update t)
(let ((closest (foldl
(lambda (pickup r)
(if (< (vdist (send pickup get-pos) pos)
(vdist pos r))
(send pickup get-pos) r))
(vector 999 999 999)
pickups)))
(with-primitive indicator
(pdata-op "+" "p" "vel")
(when (< (sin (* 2 t)) 0)
(let ((reset (random (pdata-size))))
(let ((pos (vmul (vnormalise (vsub closest pos)) 10)))
(pdata-set! "vel" reset (vadd (vmul (srndvec) 0.01)
(vmul (vsub closest pos) (* (rndf) 0.01))))
(pdata-set! "p" reset pos))))))
(with-primitive root
(scale (+ 1 (* 0.001 (sin (* 2 t))))))
(when (key-pressed "r") (with-primitive camera (parent 1)))
(when (and debounce (key-pressed " "))
(add-twig (vtransform-rot (vector 0 0 1) (minverse (get-camera-transform))))
(set! debounce #f)
(set! debounce-time (+ t 1)))
(when (> t debounce-time)
(set! debounce #t))
(for-each
(lambda (twig)
(send twig update t))
twigs)
(for-each
(lambda (pickup)
(send pickup update t))
pickups))
(super-new)))
; build world
(with-state
(scale 5 )
(translate (vector 0 0 0))
(with-state
(texture (load-texture "textures/top.png"))
(translate (vector 0 20 0))
(rotate (vector 90 0 0))
(scale 40)
(hint-unlit)
(build-plane))
(with-state
(texture (load-texture "textures/left.png"))
(translate (vector 0 0 -20))
(rotate (vector 0 0 0))
(scale 40)
(hint-unlit)
(build-plane))
(with-state
(texture (load-texture "textures/back.png"))
(translate (vector 20 0 0))
(rotate (vector 0 90 0))
(scale 40)
(hint-unlit)
(build-plane))
(with-state
(texture (load-texture "textures/right.png"))
(translate (vector 0 0 20))
(rotate (vector 0 0 0))
(scale 40)
(hint-unlit)
(build-plane))
(with-state
(texture (load-texture "textures/front.png"))
(translate (vector -20 0 0))
(rotate (vector 0 90 0))
(scale 40)
(hint-unlit)
(build-plane))
(with-state
(texture (load-texture "textures/bottom.png"))
(opacity 0.8)
(hint-depth-sort)
(translate (vector 0 2 0))
(rotate (vector 90 0 0))
(scale 40)
(hint-unlit)
(build-plane))
; soil
(with-state
(texture (load-texture "textures/sback.png"))
(translate (vector 0 -15 -19.99))
(rotate (vector 0 0 0))
(scale 40)
(hint-unlit)
(build-plane))
(with-state
(texture (load-texture "textures/sleft.png"))
(translate (vector 19.9 -15 0))
(rotate (vector 0 90 0))
(scale 40)
(hint-unlit)
(build-plane))
(with-state
(texture (load-texture "textures/sfront.png"))
(translate (vector 0 -15 19.9))
(rotate (vector 0 0 0))
(scale 40)
(hint-unlit)
(build-plane))
(with-state
(texture (load-texture "textures/sright.png"))
(translate (vector -19.9 -15 0))
(rotate (vector 0 90 0))
(scale 40)
(hint-unlit)
(build-plane)))
(lock-camera camera)
(camera-lag 0.05)
(define l (make-light 'point 'free))
(light-diffuse 0 (vector 0 0 0))
(light-diffuse l (vector 1 1 1))
(light-position l (vector 10 50 -4))
(clear-colour (vector 0.1 0.3 0.2))
(fog (vector 0.2 0.5 0.3) 0.01 1 100)
(define s (make-object seed%))
(define t 0)
(define (animate)
(send s update t)
(set! t (+ t 0.02)))
(every-frame (animate))

View file

@ -0,0 +1,164 @@
;#lang scheme/base
;(require fluxus-016/drflux)
(require scheme/class
"logic.ss"
"view.ss"
"controller.ss"
"client.ss"
"jabberer.ss"
"list-utils.ss")
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; p l a n t e y e s
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; notes:
;
; * keeping with a view/logic separation, although this is quite different to
; the hexagon game. the main advantages:
; - just a divide and conquer strategy for staying sane
; - able to debug the logic without the view, or vice versa
; - the logic can be ticked at a lower frequency - or even different
; parts at different rates, whereas the view needs ticking every frame
;
; * need to try to keep all the intensive 'every thing vs every thing' checking
; in the logic side, where it can be done over many frames (i'm thinking the
; lags involved with things like nutrients getting absorbed may not matter
; too much in this game)
;
; * using a message passing system to formalise the passing of information on
; the logic side. this makes it possible to have objects sending messages
; at any point, and have them automatically collected up and dispatched to
; the view
;
; * these messages are also converted to xmpp messages and sent out over the
; network
;
; * line segments are computed in the logic side, and can be represented any
; way by the view - maybe the players plant will be geometry and everyone
; elses will be ribbons (stoopid LOD)
;
; * in the same way, the line segments can be created in any way by the logic
; side - eg. lsystem, or different methods per plant (or per twig even)
(define-struct player-info (jid pass tex pos col))
(define gui-game-mode%
(class object%
(field
(players (list
(make-player-info "plant0000001@fo.am" "plant0000001"
"textures/plant0000001.png" (vector 11.682296752929688 -27.272457122802734 -2.8969409465789795) (vector 0.5 1 0.5))
(make-player-info "plant0000002@fo.am" "plant0000002"
"textures/plant0000002.png" (vector 22.92951774597168 -24.62310218811035 -4.961982727050781) (vector 0.5 1 0))
(make-player-info "plant0000003@fo.am" "plant0000003"
"textures/plant0000003.png" (vector 11.626119613647461 -24.734521865844727 -25.146560668945312) (vector 0 1 0.5))
(make-player-info "plant0000004@fo.am" "plant0000004"
"textures/plant0000004.png" (vector -18.757593154907227 -10.819361686706543 37.17854690551758)(vector 0.75 1 0.5))
(make-player-info "plant0000005@fo.am" "plant0000005"
"textures/plant0000005.png" (vector -10.964780807495117 -20.065677642822266 23.76084327697754) (vector 0.5 1 0.75))
))
(seeds '())
(clicked -1))
(define/public (get-player-info)
(list-ref players clicked))
(define/public (setup)
(let ((c 0))
(set! seeds (map
(lambda (pi)
(with-state
(translate (vmul (vector (sin (* 2 3.141 (/ c (length players))))
(cos (* 2 3.141 (/ c (length players)))) 0) 4))
;(texture (load-texture (player-info-tex pi)))
(colour (player-info-col pi))
(set! c (+ c 1))
;(shader "shaders/toon.vert.glsl" "shaders/toon.frag.glsl")
(load-primitive "meshes/seed.obj")))
players))))
(define/public (update t d)
(for-each
(lambda (seed)
(with-primitive seed
(rotate (vector 0 1 0))))
seeds)
(cond
((mouse-button 1)
(let ((o (mouse-over)))
(cond
(o
(set! clicked (which-element o seeds 0))
(when clicked
(for-each
(lambda (seed)
(destroy seed))
seeds))
(if clicked #t #f))
(else
#f))))
(else
#f)))
(super-new)))
(define main-game-mode%
(class object%
(field
(gl (make-object game-logic%))
(gv (make-object game-view%))
(c (make-object controller% gv))
(cl #f)
(tick-time 0)
(player #f)
(logic-tick 0.5)) ; time between logic updates
(define/public (setup pi)
(set! cl (make-object client% (player-info-jid pi) (player-info-pass pi)))
(set! player (make-object plant-logic%
(player-info-jid pi)
(player-info-pos pi)
(player-info-col pi)
(player-info-tex pi)))
(send c set-player-plant player)
(send gl add-player player)
(send c setup)
(send gv setup)
(send gl setup)
(send cl setup))
(define/public (update t d)
(when (< tick-time t)
(let ((messages (send gl update)))
; pass the messages to the network client
(send gv update t d (send cl update messages gl))) ; and the game view
(set! tick-time (+ t logic-tick)))
(send gv update t d '())
(send c update))
(super-new)))
(clear)
(clear-shader-cache)
(define mode 'gui)
(define gui (make-object gui-game-mode%))
(define game (make-object main-game-mode%))
(send gui setup)
(define (animate)
(cond
((eq? mode 'gui)
(when (send gui update (flxtime) (delta))
(send game setup (send gui get-player-info))
(set! mode 'game)))
((eq? mode 'game)
(send game update (flxtime) (delta)))))
(every-frame (animate))

View file

@ -0,0 +1,164 @@
;#lang scheme/base
;(require fluxus-016/drflux)
(require scheme/class
"logic.ss"
"view.ss"
"controller.ss"
"client.ss"
"jabberer.ss"
"list-utils.ss")
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; p l a n t e y e s
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; notes:
;
; * keeping with a view/logic separation, although this is quite different to
; the hexagon game. the main advantages:
; - just a divide and conquer strategy for staying sane
; - able to debug the logic without the view, or vice versa
; - the logic can be ticked at a lower frequency - or even different
; parts at different rates, whereas the view needs ticking every frame
;
; * need to try to keep all the intensive 'every thing vs every thing' checking
; in the logic side, where it can be done over many frames (i'm thinking the
; lags involved with things like nutrients getting absorbed may not matter
; too much in this game)
;
; * using a message passing system to formalise the passing of information on
; the logic side. this makes it possible to have objects sending messages
; at any point, and have them automatically collected up and dispatched to
; the view
;
; * these messages are also converted to xmpp messages and sent out over the
; network
;
; * line segments are computed in the logic side, and can be represented any
; way by the view - maybe the players plant will be geometry and everyone
; elses will be ribbons (stoopid LOD)
;
; * in the same way, the line segments can be created in any way by the logic
; side - eg. lsystem, or different methods per plant (or per twig even)
(define-struct player-info (jid pass tex pos col))
(define gui-game-mode%
(class object%
(field
(players (list
(make-player-info "plant0000001@fo.am" "plant0000001"
"textures/plant0000001.png" (vector 11.682296752929688 -27.272457122802734 -2.8969409465789795) (vector 0.5 1 0.5))
(make-player-info "plant0000002@fo.am" "plant0000002"
"textures/plant0000002.png" (vector 22.92951774597168 -24.62310218811035 -4.961982727050781) (vector 0.5 1 0))
(make-player-info "plant0000003@fo.am" "plant0000003"
"textures/plant0000003.png" (vector 11.626119613647461 -24.734521865844727 -25.146560668945312) (vector 0 1 0.5))
(make-player-info "plant0000004@fo.am" "plant0000004"
"textures/plant0000004.png" (vector -18.757593154907227 -10.819361686706543 37.17854690551758)(vector 0.75 1 0.5))
(make-player-info "plant0000005@fo.am" "plant0000005"
"textures/plant0000005.png" (vector -10.964780807495117 -20.065677642822266 23.76084327697754) (vector 0.5 1 0.75))
))
(seeds '())
(clicked -1))
(define/public (get-player-info)
(list-ref players clicked))
(define/public (setup)
(let ((c 0))
(set! seeds (map
(lambda (pi)
(with-state
(translate (vmul (vector (sin (* 2 3.141 (/ c (length players))))
(cos (* 2 3.141 (/ c (length players)))) 0) 4))
;(texture (load-texture (player-info-tex pi)))
(colour (player-info-col pi))
(set! c (+ c 1))
;(shader "shaders/toon.vert.glsl" "shaders/toon.frag.glsl")
(load-primitive "meshes/seed.obj")))
players))))
(define/public (update t d)
(for-each
(lambda (seed)
(with-primitive seed
(rotate (vector 0 1 0))))
seeds)
(cond
((mouse-button 1)
(let ((o (mouse-over)))
(cond
(o
(set! clicked (which-element o seeds 0))
(when clicked
(for-each
(lambda (seed)
(destroy seed))
seeds))
(if clicked #t #f))
(else
#f))))
(else
#f)))
(super-new)))
(define main-game-mode%
(class object%
(field
(gl (make-object game-logic%))
(gv (make-object game-view%))
(c (make-object controller% gv))
(cl #f)
(tick-time 0)
(player #f)
(logic-tick 0.5)) ; time between logic updates
(define/public (setup pi)
(set! cl (make-object client% (player-info-jid pi) (player-info-pass pi)))
(set! player (make-object plant-logic%
(player-info-jid pi)
(player-info-pos pi)
(player-info-col pi)
(player-info-tex pi)))
(send c set-player-plant player)
(send gl add-player player)
(send c setup)
(send gv setup)
(send gl setup)
(send cl setup))
(define/public (update t d)
(when (< tick-time t)
(let ((messages (send gl update)))
; pass the messages to the network client
(send gv update t d (send cl update messages gl))) ; and the game view
(set! tick-time (+ t logic-tick)))
(send gv update t d '())
(send c update))
(super-new)))
(clear)
(clear-shader-cache)
(define mode 'gui)
(define gui (make-object gui-game-mode%))
(define game (make-object main-game-mode%))
(send gui setup)
(define (animate)
(cond
((eq? mode 'gui)
(when (send gui update (flxtime) (delta))
(send game setup (send gui get-player-info))
(set! mode 'game)))
((eq? mode 'game)
(send game update (flxtime) (delta)))))
(every-frame (animate))

View file

@ -0,0 +1,14 @@
(clear)
(clear-colour 0.5)
(define p (build-ribbon 20))
(with-primitive p
(translate (vector 1 0 0))
(pdata-map!
(lambda (p)
(srndvec))
"p")
(pdata-map!
(lambda (w)
0.01)
"w"))

42
plant-eyelids/scratch.scm Normal file
View file

@ -0,0 +1,42 @@
(define particle-count 10000)
; init one particle
(define (init n)
(pdata-set "p" n (vector 0 0 0))
(pdata-set "vel" n (vmul (vsub (vector (flxrnd) (flxrnd) (flxrnd))
(vector 0.5 0.5 0.5)) 0.1))
(pdata-set "c" n (vector (flxrnd) (flxrnd) 1)))
; init some random particles
(define (initsome n)
(cond ((not (zero? n))
(init (random particle-count))
(initsome (- n 1)))))
(define (animate)
(with-primitive particles
(initsome 100)
; pdata-ops are a bit like simple pfuncs -
; they are both similar experiments, pfuncs
; will be the way it works in the future
(pdata-op "+" "vel" (vector 0 -0.002 0))
(pdata-op "+" "p" "vel")))
(clear)
(show-fps 1)
(hint-none)
(hint-points)
(point-width 4)
(hint-anti-alias)
(define particles (build-particles particle-count))
(with-primitive particles (pdata-add "vel" "v"))
(blur 0.1)
(every-frame (animate))

View file

@ -0,0 +1,42 @@
(define particle-count 10000)
; init one particle
(define (init n)
(pdata-set "p" n (vector 0 0 0))
(pdata-set "vel" n (vmul (vsub (vector (flxrnd) (flxrnd) (flxrnd))
(vector 0.5 0.5 0.5)) 0.1))
(pdata-set "c" n (vector (flxrnd) (flxrnd) 1)))
; init some random particles
(define (initsome n)
(cond ((not (zero? n))
(init (random particle-count))
(initsome (- n 1)))))
(define (animate)
(with-primitive particles
(initsome 100)
; pdata-ops are a bit like simple pfuncs -
; they are both similar experiments, pfuncs
; will be the way it works in the future
(pdata-op "+" "vel" (vector 0 -0.002 0))
(pdata-op "+" "p" "vel")))
(clear)
(show-fps 1)
(hint-none)
(hint-points)
(point-width 4)
(hint-anti-alias)
(define particles (build-particles particle-count))
(with-primitive particles (pdata-add "vel" "v"))
(blur 0.1)
(every-frame (animate))

View file

@ -0,0 +1,31 @@
varying vec3 N;
varying vec3 L;
varying vec3 V;
varying vec2 T;
uniform sampler2D BaseMap;
void main()
{
vec3 n = normalize(N);
vec3 l = normalize(L);
vec3 v = normalize(V);
float HighlightSize=0.1;
float ShadowSize=0.2;
float OutlineWidth=0.3;
vec4 MidColour=gl_FrontMaterial.diffuse;
vec4 HighlightColour=MidColour*2.0;
vec4 ShadowColour=MidColour*0.5;
HighlightColour.a=0.5;
ShadowColour.a=0.5;
float lambert = dot(l,n);
vec4 colour = MidColour;
if (lambert > 1.0-HighlightSize) colour = HighlightColour;
if (lambert < ShadowSize) colour = ShadowColour;
if (dot(n,v) < OutlineWidth) colour = vec4(0,0,0,1);
if (dot(n,v) < 0.0) colour = MidColour*texture2D(BaseMap, T);
gl_FragColor = colour;
}

View file

@ -0,0 +1,18 @@
// Copyright (C) 2007 Dave Griffiths
// Licence: GPLv2 (see COPYING)
varying vec3 N;
varying vec3 P;
varying vec3 V;
varying vec3 L;
varying vec2 T;
void main()
{
N = normalize(gl_NormalMatrix*gl_Normal);
P = gl_Vertex.xyz;
V = -vec3(gl_ModelViewMatrix*gl_Vertex);
vec4 LightPos = gl_LightSource[1].position;
L = vec3(gl_ModelViewMatrix*(LightPos-gl_Vertex));
T = gl_MultiTexCoord0.xy;
gl_Position = ftransform();
}

BIN
plant-eyelids/snd/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
plant-eyelids/snd/src/c.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
plant-eyelids/stones.txt Normal file

File diff suppressed because one or more lines are too long

BIN
plant-eyelids/textures/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

857
plant-eyelids/view.ss Normal file
View file

@ -0,0 +1,857 @@
#lang scheme/base
(require scheme/class fluxus-016/fluxus "message.ss" "list-utils.ss")
(provide (all-defined-out))
; the fluxus code to make things look the way they do
(define debug-messages #f) ; prints out all the messages sent to the renderer
(define audio-on #f)
(define (ornament-colour) (vector 0.5 1 0.4))
(define (pickup-colour) (vector 1 1 1))
(define (earth-colour) (vector 0.15 0.1 0.01))
(define (stones-colour) (vmul (earth-colour) (+ 0.5 (* (rndf) 0.5))))
(define wire-mode #f)
(define fog-col (earth-colour))
(define fog-strength 0.01)
(define max-ornaments 2) ; per twig
(define default-grow-speed 0.5)
(when audio-on (oa-start)) ;; start openAL audio
(define stones-list (let* ((f (open-input-file "stones.txt"))
(o (read f)))
(close-input-port f)
o))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define ornament-view%
(class object%
(init-field
(pos (vector 0 0 0))
(property 'none)
(time 0))
(field
(rot (vmul (rndvec) 360))
(root (with-state
(translate pos)
(rotate rot)
(scale 0.01)
(cond
((eq? property 'wiggle)
; (opacity 1)
(hint-depth-sort)
(colour (vector 0.5 0.0 0.0))
(load-primitive "meshes/wiggle.obj"))
((eq? property 'leaf)
(colour (vector 0.8 1 0.6))
(texture (load-texture "textures/leaf2.png"))
(load-primitive "meshes/leaf.obj"))
(else (error ""))))))
(define/public (update t d)
(when (< time 1)
(with-primitive root
(identity)
(translate pos)
(rotate rot)
(scale (* 0.2 time)))
(set! time (+ time (* 0.1 d)))))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define pickup-view%
(class object%
(init-field
(id -1)
(type 'none)
(pos (vector 0 0 0)))
(field
(rot (vmul (rndvec) 360))
(root (with-state
(translate pos)
(rotate rot)
(colour (pickup-colour))
(scale 0.3)
(texture
(cond
((eq? type 'wiggle) (load-texture "textures/wiggle.png"))
((eq? type 'leaf) (load-texture "textures/leaf.png"))
((eq? type 'curly) (load-texture "textures/curl.png"))))
(load-primitive "meshes/pickup.obj")))
(from pos)
(destination (vector 0 0 0))
(speed 0.05)
(t -1))
(define/public (pick-up)
(destroy root))
(define/public (move-to s)
(set! t 0)
(set! from pos)
(set! destination s))
(define/public (update t d)
(with-primitive root
(rotate (vector (* d 10) 0 0)))
#;(when (and (>= t 0) (< t 1))
(set! pos (vadd pos (vmul (vsub destination from) speed)))
(with-primitive root
(identity)
(translate pos)
(rotate rot))
(set! t (+ t speed))))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define twig-view%
(class object%
(init-field
(id 0)
(pos (vector 0 0 0))
(type 'none)
(dir (vector 0 1 0))
(radius 1)
(num-points 0))
(field
(index 0)
(parent-twig-id -1)
(child-twig-ids '())
(ornaments '())
(col (vector 1 1 1))
(tex "")
(markers '())
(grow-t 999)
(marker-destroy-t 0)
(grow-speed default-grow-speed))
(define/public (get-id)
id)
(define/public (get-dir)
dir)
(define/public (set-col! s)
(set! col s))
(define/public (set-tex! s)
(set! tex s))
(define/public (build)
0)
(define/public (get-num-points)
index)
(define/public (set-pos! s)
(set! pos s))
(define/public (get-child-twig-ids)
child-twig-ids)
(define/public (get-root)
(error "need to overide this"))
(define/public (destroy-twig)
(destroy (get-root)))
(define/public (set-parent-twig-id s)
(set! parent-twig-id s))
(define/public (get-point point-index)
(error "need to overide this"))
(define/public (get-width point-index)
(error "need to overide this"))
(define/public (add-child-twig-id twig-id)
(set! child-twig-ids (cons twig-id child-twig-ids)))
(define/public (start-growing)
(set! grow-t 0)
(set! markers (cons (build-locator) markers)))
(define/pubment (add-point point width)
(when audio-on (let ((growing-noise (oa-load-sample (fullpath "snd/event01.wav"))))
(oa-play growing-noise (vector 0 0 0) (rndf) 0.3)))
(set! markers (append markers (list (with-state
(parent (get-root))
(translate point)
(scale 0.2)
(shader "shaders/toon.vert.glsl" "shaders/toon.frag.glsl")
(colour col)
(build-sphere 10 10)))))
(inner (void) add-point point width))
(define/public (add-ornament point-index property)
(when (< (length ornaments) max-ornaments)
(with-state
(parent (get-root))
; todo - different ornament-view objects per property needed?
; todo - delete existing ornaments here
(set! ornaments (cons (list point-index
(make-object ornament-view%
(get-point point-index)
property))
ornaments)))))
(define/pubment (update t d)
(for-each
(lambda (ornament)
(send (cadr ornament) update t d))
ornaments)
(inner (void) update t d)
(when (< grow-t num-points)
(set! grow-t (+ grow-t (* d grow-speed)))
(when (> 0 (- marker-destroy-t grow-t))
; soundtodo: marker gobble
(set! marker-destroy-t (+ 1 marker-destroy-t))
(destroy (car markers))
(set! markers (cdr markers)))))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define ribbon-twig-view%
(class twig-view%
(inherit-field pos radius num-points index col tex)
(field
(root 0))
(define/override (build)
(set! root (let ((p (with-state
(translate pos)
(colour col)
(texture (load-texture tex))
(build-ribbon num-points))))
(with-primitive p
(pdata-map!
(lambda (w)
0)
"w")
(pdata-set! "w" 0 radius))
p)))
(define/override (get-root)
root)
(define/override (get-point point-index)
(with-primitive root
(pdata-ref "p" point-index)))
(define/override (get-width point-index)
(with-primitive root
(pdata-ref "w" point-index)))
(define/augment (add-point point width)
(with-primitive root
(pdata-index-map! ; set all the remaining points to the end
(lambda (i p) ; in order to hide them
(if (< i index)
p
point))
"p")
(pdata-index-map! ; do a similar thing with the width
(lambda (i w)
(if (< i (+ index 1))
w
width))
"w"))
(set! index (+ index 1)))
(define/augment (update t d)
0)
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define extruded-twig-view%
(class twig-view%
(inherit-field index radius num-points pos dir col tex grow-t)
(field
(profile '())
(path '())
(root 0)
(widths '()))
(define/override (build)
(set! profile (build-circle-profile 16 1))
(set! path (build-list num-points (lambda (_) (vector 0 0 0))))
(set! widths (build-list num-points (lambda (_) 1)))
(set! root (let ((p (with-state
(backfacecull 0)
(when wire-mode
(hint-none)
(hint-wire))
(shader "shaders/toon.vert.glsl" "shaders/toon.frag.glsl")
(texture (load-texture tex))
(opacity 0.6)
(colour col)
#;(colour (vector 1 1 1))
#;(texture (load-texture "textures/root.png"))
(build-partial-extrusion profile path 3))))
p)))
(define/override (get-root)
root)
(define/override (get-point point-index)
(list-ref path point-index))
(define/override (get-width point-index)
(list-ref widths point-index))
(define (list-set l c s)
(cond ((null? l) '())
((zero? c) (cons s (list-set (cdr l) (- c 1) s)))
(else (cons (car l) (list-set (cdr l) (- c 1) s)))))
(define/augment (add-point point width)
(set! path (list-set path index point))
(set! widths (list-set widths index width))
(set! index (+ index 1)))
(define/augment (update t d)
(when (< grow-t (length path))
(with-primitive root
(partial-extrude grow-t profile path widths (vector 1 0 0) 0.05))))
(define/public (get-end-pos)
(list-ref path (if (zero? index) 0 (- index 1)))
#;(with-primitive root (pdata-ref "p" (- (* index (length profile)) 1))))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define plant-view%
(class object%
(init-field
(id "none")
(pos (vector 0 0 0))
(size 0)
(col (vector 1 1 1))
(tex "ooo"))
(field
(twigs '()) ; a assoc list map between ids and twigs stored flat here,
; for fast access, but prims heirachically in the scenegraph
(root (with-state
(translate pos)
(build-locator)))
(seed (with-state
(parent root)
(shader "shaders/toon.vert.glsl" "shaders/toon.frag.glsl")
(texture (load-texture tex))
(backfacecull 0)
(opacity 0.6)
(colour col)
(hint-depth-sort)
(scale (* 0.12 size))
(when wire-mode
(hint-none)
(hint-wire))
;(hint-unlit)
(load-primitive "meshes/seed.obj")))
(nutrients (let ((p (with-state
(hint-depth-sort)
(hint-unlit)
(parent root)
(blend-mode 'src-alpha 'one)
(opacity 0.8)
(texture (load-texture "textures/smoke.png"))
(build-particles 1111))))
(with-primitive p
(pdata-add "twig" "f")
(pdata-add "point" "f")
(pdata-add "offset" "v")
(pdata-add "speed" "f")
(pdata-map!
(lambda (point)
0)
"point")
(pdata-map!
(lambda (point)
(* 0.05 (+ 0.1 (rndf))))
"speed")
(pdata-map!
(lambda (offset)
(vector 0 0 0))
"offset")
(pdata-map!
(lambda (c)
(vector 0.2 0.6 (rndf)))
"c")
(pdata-map!
(lambda (p)
(vmul (vadd (crndvec) (vector 0 -1 0)) 900))
"p")
(pdata-map!
(lambda (s)
(vmul (vector 1 1 1) (* 6.0 (rndf))))
"s"))
p)))
(define/public (get-id)
id)
(define/public (get-col)
col)
(define/public (get-twig twig-id)
(let ((l (assq twig-id twigs)))
(if l
(cadr (assq twig-id twigs))
#f)))
(define/public (destroy-branch-twig twig-id)
(for-each
(lambda (twig-id)
(destroy-branch-twig twig-id))
(send (get-twig twig-id) get-child-twig-ids))
(send (get-twig twig-id) destroy-twig)
(set! twigs (assoc-remove twig-id twigs)))
(define/public (destroy-plant)
(destroy root)
(for-each
(lambda (twig)
(destroy-branch-twig (car twig)))
twigs))
(define/public (add-twig parent-twig-id point-index twig)
(let ((ptwig (get-twig parent-twig-id)))
(when ptwig
(send twig set-pos! (send ptwig get-point point-index)) ; attach to parent twig
; tell the twigs about this relationship (might turn out to be overkill)
(send ptwig add-child-twig-id (send twig get-id))
(send twig set-parent-twig-id parent-twig-id))
(send twig set-col! col)
(send twig set-tex! tex)
(send twig build)
(with-primitive (send twig get-root)
(parent root))
(set! twigs (cons (list (send twig get-id) twig) twigs))))
(define/public (add-twig-point twig-id point width)
(send (get-twig twig-id) add-point point width))
(define/public (start-twig-growing twig-id)
(send (get-twig twig-id) start-growing))
(define/public (grow-seed amount)
(with-primitive seed (scale amount)))
(define/public (add-ornament twig-id point-index property)
(send (get-twig twig-id) add-ornament point-index property))
(define/public (update-nutrients t d)
(when (not (null? twigs))
(with-primitive nutrients
(pdata-index-map!
(lambda (i p twig-id point offset speed)
(let* ((twig-id (inexact->exact twig-id))
(twig (get-twig twig-id))
(point (inexact->exact point)))
(cond
((or (< point 1) (not twig))
(let* ((new-twig (choose twigs))
(num-points (send (cadr new-twig) get-num-points))
(new-point (if (zero? num-points) 0 (random num-points))))
(pdata-set! "twig" i (car new-twig))
(pdata-set! "point" i new-point)
(pdata-set! "offset" i (vmix offset (vmul (srndvec) (send (cadr new-twig) get-width new-point)) 0.2))
(send (cadr new-twig) get-point new-point)))
((< (vdist (vadd (send twig get-point point) offset) p) 0.1)
(pdata-set! "point" i (- point 1))
(vadd p (vmul (vnormalise (vsub (vadd (send twig get-point (- point 1)) offset) p)) speed)))
(else
(vadd p (vmul (vnormalise (vsub (vadd (send twig get-point point) offset) p)) speed))))))
"p" "twig" "point" "offset" "speed"))))
(define/public (update t d)
(update-nutrients t d)
(with-primitive seed
(scale (+ 1 (* 0.001 (sin (* 2 t))))))
(for-each
(lambda (twig)
(send (cadr twig) update t d))
twigs))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define (build-env-box top bottom left right front back lower)
(let ((p (build-locator)))
(with-state
(parent p)
(hint-unlit)
(let ((t (with-state
(texture (load-texture top))
(translate (vector 0 0.5 0))
(rotate (vector 90 0 0))
(build-plane))))
(when lower (with-primitive t
(pdata-map!
(lambda (t)
(vmul t 10))
"t"))))
(with-state
(texture (load-texture left))
(translate (vector 0 0 -0.5))
(rotate (vector 0 0 0))
(build-plane))
(with-state
(texture (load-texture back))
(translate (vector 0.5 0 0))
(rotate (vector 0 90 0))
(build-plane))
(with-state
(texture (load-texture right))
(translate (vector 0 0 0.5))
(rotate (vector 0 0 0))
(build-plane))
(with-state
(texture (load-texture front))
(translate (vector -0.5 0 0))
(rotate (vector 0 90 0))
(build-plane))
(when lower
(with-state
(texture (load-texture bottom))
(translate (vector 0 -0.5 0))
(rotate (vector 90 0 0))
(build-plane)))
p)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define game-view%
(class object%
(field
(plants '()) ; map of ids -> plants
(pickups '()) ; map of ids -> pickups
(camera-dist 1)
(env-root (with-state (scale 1000) (build-locator)))
(root-camera-t 0)
#;(upper-env (with-state
(parent env-root)
(hint-depth-sort)
(colour 2)
(translate (vector 0 0.28 0))
(build-env-box "textures/top.png" "textures/bottom-trans.png"
"textures/left.png" "textures/right.png"
"textures/front.png" "textures/back.png")))
#;(lower-env (with-state
(parent env-root)
(hint-depth-sort)
(translate (vector 0 -0.22001 0))
(build-env-box "textures/bottom-trans.png" "textures/bottom.png"
"textures/sleft.png" "textures/sright.png"
"textures/sfront.png" "textures/sback.png")))
(upper-env (with-state
(parent env-root)
;(hint-depth-sort)
(hint-unlit)
(translate (vector 0 0.28 0))
(build-env-box "textures/sky-top.png" "textures/floor.png"
"textures/sky-side.png" "textures/sky-side.png"
"textures/sky-side.png" "textures/sky-side.png" #f)))
(lower-env (with-state
(parent env-root)
;(hint-depth-sort)
(hint-unlit)
(colour (earth-colour))
(translate (vector 0 -0.22001 0))
(build-env-box "textures/floor.png" "textures/earth-bottom.png"
"textures/earth-side.png" "textures/earth-side.png"
"textures/earth-side.png" "textures/earth-side.png" #t)))
(stones '()))
(define/public (setup)
(let ((l (make-light 'point 'free)))
(light-diffuse 0 (vector 0.5 0.5 0.5))
(light-diffuse l (vector 1 1 1))
(light-position l (vector 10 50 -4)))
(clear-colour fog-col)
;(clip 1 10000)
(ortho)
(set-ortho-zoom 30)
(fog fog-col fog-strength 1 900)
(set! stones
(map
(lambda (stone)
(let ((p (with-state
(hint-frustum-cull)
(shader "shaders/toon.vert.glsl" "shaders/toon.frag.glsl")
(colour (stones-colour))
(translate (list-ref stone 1))
(scale (list-ref stone 2))
(rotate (list-ref stone 3))
(texture (load-texture "textures/quartz.png"))
(load-primitive (list-ref stone 0)))))
(with-primitive p (apply-transform) (recalc-bb)) ; apply the transform to speed up the ray tracing, don't have to tranform the ray into object space
p))
stones-list))
;; view obstruction and abstraction
(let ((p (with-state
(hint-depth-sort)
(hint-unlit)
;(parent root)
;(blend-mode 'src-alpha 'one)
;(blend-mode 'dst-color 'src-alpha)
(blend-mode 'src-alpha 'one)
(opacity 0.01)
(texture (load-texture "textures/fossil.png"))
(build-particles 500))))
(with-primitive p
(pdata-add "twig" "f")
(pdata-add "point" "f")
(pdata-add "offset" "v")
(pdata-add "speed" "f")
(pdata-map!
(lambda (point)
0)
"point")
(pdata-map!
(lambda (point)
(* 0.2 (+ 0.1 (rndf))))
"speed")
(pdata-map!
(lambda (offset)
(vector 0 0 0.1))
"offset")
(pdata-map!
(lambda (c)
(vector 0.2 (rndf) (rndf)))
"c")
(pdata-map!
(lambda (p)
(vmul (vadd (crndvec) (vector 0 -1 0)) 900))
"p")
(pdata-map!
(lambda (s)
(vmul (crndvec) 600))
"s"))
)
;; dirt, grit and spacefilling
(let ((p (with-state
(hint-depth-sort)
(hint-unlit)
;(parent root)
;(blend-mode 'dst-color 'src-alpha)
(blend-mode 'src-alpha 'one)
(opacity 0.5)
(texture (load-texture "textures/leaf2.png"))
(build-particles 400))))
(with-primitive p
(pdata-add "twig" "f")
(pdata-add "point" "f")
(pdata-add "offset" "v")
(pdata-add "speed" "f")
(pdata-map!
(lambda (point)
0)
"point")
(pdata-map!
(lambda (point)
(* 0.02 (+ 0.1 (rndf))))
"speed")
(pdata-map!
(lambda (offset)
(vector 0 0 0.1))
"offset")
(pdata-map!
(lambda (c)
(vector 0.2 (rndf) 0.1))
"c")
(pdata-map!
(lambda (p)
(vmul (vadd (crndvec) (vector 0 -1 0)) 900))
"p")
(pdata-map!
(lambda (s)
(vmul (crndvec) 100))
"s"))
))
(define/public (get-stones)
stones)
(define/public (add-plant plant)
(destroy-plant (send plant get-id)) ; just in case
(set! plants (cons (list (send plant get-id) plant) plants)))
(define/public (get-plant plant-id)
(let ((p (assoc plant-id plants)))
(if (not p) #f (cadr p))))
(define/public (destroy-plant plant-id)
(let ((p (get-plant plant-id)))
(when p (send p destroy-plant)
(set! plants (assoc-remove plant-id plants)))))
(define/public (destroy-branch-twig plant-id twig-id)
(send (get-plant plant-id) destroy-branch-twig twig-id))
(define/public (add-twig plant-id parent-twig-id point-index twig)
(send (get-plant plant-id) add-twig parent-twig-id point-index twig))
(define/public (grow-seed plant-id amount)
(send (get-plant plant-id) grow-seed amount))
(define/public (get-pickup pickup-id)
(cadr (assq pickup-id pickups)))
(define/public (add-pickup pickup-id type pos)
(set! pickups (cons (list pickup-id (make-object pickup-view% pickup-id type pos)) pickups)))
(define/public (pick-up-pickup pickup-id)
(send (get-pickup pickup-id) pick-up)
(set! pickups (assoc-remove pickup-id pickups)))
(define/public (add-ornament plant-id twig-id point-index property)
(send (get-plant plant-id) add-ornament twig-id point-index property))
(define/public (update t d messages)
(for-each
(lambda (plant)
(send (cadr plant) update t d))
plants)
(for-each
(lambda (pickup)
(send (cadr pickup) update t d))
pickups)
(when debug-messages
(for-each
(lambda (msg)
(send msg print))
messages))
(for-each
(lambda (msg)
(cond
((eq? (send msg get-name) 'player-plant) ; not really any difference now
(add-plant (make-object plant-view%
(send msg get-data 'plant-id)
(send msg get-data 'pos)
(send msg get-data 'size)
(send msg get-data 'col)
(send msg get-data 'tex))))
((eq? (send msg get-name) 'new-plant)
(printf "adding new plant to view ~a~n" (send msg get-data 'plant-id))
(add-plant (make-object plant-view%
(send msg get-data 'plant-id)
(send msg get-data 'pos)
(send msg get-data 'size)
(send msg get-data 'col)
(send msg get-data 'tex))))
((eq? (send msg get-name) 'grow-seed)
(grow-seed (send msg get-data 'plant-id)
(send msg get-data 'amount)))
((eq? (send msg get-name) 'destroy-branch-twig)
(destroy-branch-twig (send msg get-data 'plant-id) (send msg get-data 'twig-id)))
((eq? (send msg get-name) 'new-twig)
(add-twig (send msg get-data 'plant-id)
(send msg get-data 'parent-twig-id)
(send msg get-data 'point-index)
(cond
((eq? (send msg get-data 'render-type) 'ribbon)
(make-object ribbon-twig-view%
(send msg get-data 'twig-id)
(vector 0 0 0) ; will be filled in by add-twig
(send msg get-data 'type)
(send msg get-data 'dir)
(send msg get-data 'width)
(send msg get-data 'num-points)))
((eq? (send msg get-data 'render-type) 'extruded)
(make-object extruded-twig-view%
(send msg get-data 'twig-id)
(vector 0 0 0) ; will be filled in by add-twig
(send msg get-data 'type)
(send msg get-data 'dir)
(send msg get-data 'width)
(send msg get-data 'num-points))))))
((eq? (send msg get-name) 'add-twig-point)
(send (get-plant (send msg get-data 'plant-id)) add-twig-point
(send msg get-data 'twig-id)
(send msg get-data 'point)
(send msg get-data 'width)))
((eq? (send msg get-name) 'start-growing)
(send (get-plant (send msg get-data 'plant-id)) start-twig-growing
(send msg get-data 'twig-id)))
((eq? (send msg get-name) 'new-pickup)
(add-pickup
(send msg get-data 'pickup-id)
(send msg get-data 'type)
(send msg get-data 'pos)))
((eq? (send msg get-name) 'pick-up-pickup)
(pick-up-pickup
(send msg get-data 'pickup-id)))
((eq? (send msg get-name) 'new-ornament)
(add-ornament
(send msg get-data 'plant-id)
(send msg get-data 'twig-id)
(send msg get-data 'point-index)
(send msg get-data 'property)))
))
messages))
(super-new)))

422
plant-eyelids/xmpp.ss Normal file
View file

@ -0,0 +1,422 @@
;;; A basic XMPP library which should conform to RFCs 3920 and 3921
;;;
;;; Copyright (C) 2009 FoAM vzw.
;;;
;;; This package is free software: you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
;;; License as published by the Free Software Foundation, either
;;; version 3 of the License, or (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; Lesser General Public License for more details.
;;;
;;; You can find a copy of the GNU Lesser General Public License at
;;; http://www.gnu.org/licenses/lgpl-3.0.html.
;;;
;;; Authors
;;;
;;; nik gaffney <nik@fo.am>
;;;
;;; Requirements
;;;
;;; PLT for now. TLS requires a version of PLT > 4.1.5.3
;;;
;;; Commentary
;;;
;;; Still a long way from implementing even a minimal subset of XMPP
;;;
;;; features implemented
;;; - plaintext sessions on port 5222
;;; - "old sytle" ssl sessions on port 5223 (default)
;;; - authenticate using an existing account
;;; - send messages (rfc 3921 sec.4)
;;; - send presence (rfc 3921 sec.5)
;;; - parse (some) xml reponses from server
;;; - handlers for responses
;;; - basic roster handling (rfc 3921 sec.7)
;;;
;;; features to implement
;;; - account creation
;;; - managing subscriptions & rosters (rfc 3921 sec.6 & 8)
;;; - error handling for rosters (rfc 3921 sec.7)
;;; - plaintext/tls/sasl negotiation (rfc 3920 sec.5 & 6)
;;; - encrypted connections using tls on port 5222
;;; - correct namespaces in sxml
;;; - message types
;;; - maintain session ids
;;; - maintain threads
;;; - error handling
;;; - events
;;; - [...]
;;; - rfc 3920
;;; - rfc 3921
;;;
;;; bugs and/or improvements
;;; - start & stop functions for multiple sessions
;;; - pubsub (XEP-0060) & group chats (XEP-0045)
;;; - 'send' using call/cc & parameterize'd i/o ports
;;; - coroutines for sasl negotiation
;;; - read-async & repsonse-handler
;;; - ssax:xml->sxml or lazy:xml->sxml
;;; - default handlers
;;; - syntax for defining sxpath based handlers
;;; - improve parsing
;;; - chatbot exmples
;;;
(module xmpp scheme
(require (planet lizorkin/sxml:2:1/sxml)) ;; encoding xml
(require (planet lizorkin/ssax:2:0/ssax)) ;; decoding xml
(require mzlib/os) ;; hostname
(require scheme/tcp) ;; networking
(require openssl) ;; ssl/tls
(require srfi/13) ;; jid decoding
(provide (all-defined-out))
;;;; ; ;; ;
;;
;; debugging
;;
;;;; ; ;
(define debug? #f)
(define debugf
(case-lambda
((str) (when debug? (printf str)))
((str . dir) (when debug? (apply printf (cons str dir))))))
;;;;;;;;;;; ; ;;;; ; ;;; ; ; ;; ;
;;
;; networking
;;
;;;;;; ;; ;; ; ; ; ;
(define port 5222)
(define ssl-port 5223)
(define (open-connection machine port handler)
(let-values (((in out)
(tcp-connect machine port)))
(handler in out)
(close-output-port out)
(close-input-port in)))
(define (open-ssl-connection machine port handler)
(let-values (((in out)
(ssl-connect machine port 'tls)))
(handler in out)
(close-output-port out)
(close-input-port in)))
(define (read-async in)
(let ((r (bytes->string/utf-8 (list->bytes (read-async-bytes in)))))
r))
(define (read-async-bytes in)
(let ((bstr '()))
(when (sync/timeout 0 in)
(set! bstr (cons (read-byte in) (read-async-bytes in)))) bstr))
(define ssxml srl:sxml->xml-noindent)
;;;;;; ; ; ; ; ;; ;;;;;; ;
;;
;; XMPP stanzas
;;
;;;;;;;;;; ;;; ; ;; ; ;
;; intialization
(define (xmpp-stream host)
(string-append "<?xml version='1.0'?>" ;; version='1.0' is a MUST for SASL on 5222 but NOT for ssl on 5223
"<stream:stream xmlns:stream='http://etherx.jabber.org/streams' to='"
host
"' xmlns='jabber:client' >"))
;; authentication
(define (xmpp-auth username password resource)
(ssxml `(iq (@ (type "set") (id "auth"))
(query (@ (xmlns "jabber:iq:auth"))
(username ,username)
(password ,password)
(resource ,resource)))))
(define (xmpp-session host)
(ssxml `(iq (@ (to ,host) (type "set") (id "session"))
(session (@ (xmlns "urn:ietf:params:xml:ns:xmpp-session"))))))
;; messages
(define (message to body)
(ssxml `(message (@ (to ,to)) (body ,body))))
;; presence
(define (presence #:from (from "")
#:to (to "")
#:type (type "")
#:show (show "")
#:status (status ""))
(cond ((not (string=? status ""))
(ssxml `(presence (@ (type "probe")) (status ,status))))
((string=? type "") "<presence/>")
(else (ssxml `(presence (@ (type ,type)))))))
;; queries
(define (iq body
#:from (from "")
#:to (to "")
#:type (type "")
#:id (id ""))
(ssxml `(iq (@ (to ,to) (type ,type) ,body))))
;; curried stanza disection (sxml stanza -> string)
(define ((sxpath-element xpath (ns "")) stanza)
(let ((node ((sxpath xpath (list (cons 'ns ns))) stanza)))
(if (empty? node) "" (car node))))
;; message
(define message-from (sxpath-element "message/@from/text()"))
(define message-to (sxpath-element "message/@to/text()"))
(define message-id (sxpath-element "message/@id/text()"))
(define message-type (sxpath-element "message/@type/text()"))
(define message-body (sxpath-element "message/body/text()"))
(define message-subject (sxpath-element "message/subject/text()"))
;; info/query
(define iq-type (sxpath-element "iq/@type/text()"))
(define iq-id (sxpath-element "iq/@id/text()"))
(define iq-error-type (sxpath-element "iq/error/@type/text()"))
(define iq-error-text (sxpath-element "iq/error/text()"))
(define iq-error (sxpath-element "iq/error"))
;; presence
(define presence-show (sxpath-element "presence/show/text()"))
(define presence-from (sxpath-element "presence/@from/text()"))
(define presence-status (sxpath-element "presence/status/text()"))
;;;;;;;;;; ; ; ; ;; ;
;;
;; rosters
;;
;;;;;; ; ;; ;
;; request the roster from server
(define (request-roster from)
(ssxml `(iq (@ (from ,from) (type "get") (id "roster_1"))
(query (@ (xmlns "jabber:iq:roster"))))))
;; add an item to the roster
(define (add-to-roster from jid name group)
(ssxml `(iq (@ (from ,from) (type "set") (id "roster_2"))
(query (@ (xmlns "jabber:iq:roster"))
(item (@ (jid ,jid) (name ,name))
(group ,group))))))
;; update an item in the roster
(define (update-roster from jid name group)
(ssxml `(iq (@ (from ,from) (type "set") (id "roster_3"))
(query (@ (xmlns "jabber:iq:roster"))
(item (@ (jid ,jid) (name ,name))
(group ,group))))))
;; remove an item from the roster
(define (remove-from-roster from jid)
(ssxml `(iq (@ (from ,from) (type "set") (id "roster_4"))
(query (@ (xmlns "jabber:iq:roster"))
(item (@ (jid ,jid) (subscription "remove")))))))
;;;;; ; ; ;; ; ;
;;
;; in-band registration
;;
;;;;;; ;; ;; ;
(define (reg1)
(ssxml `(iq (@ (type "get") (id "reg1"))
(query (@ (xmlns "jabber:iq:register"))))))
;;;; ;; ; ;;; ;
;;
;; tls & sasl
;; - http://xmpp.org/rfcs/rfc3920.html#tls
;; - http://xmpp.org/rfcs/rfc3920.html#sasl
;;
;;;; ;;
(define session->tls? #f) ;; changes state when a tls proceed is recived
;; moved to xmpp-sasl until it 'works'
;;;;;;;;; ; ;; ; ; ;; ;; ; ;
;;
;; parsing & message/iq/error handlers
;; - minimal parsing
;; - handlers match on a tag (eg. 'message)
;; - handlers are called with a single relevant xmpp stanza
;;
;;;;;; ;; ; ; ;; ;
(define xmpp-handlers (make-hash)) ;; a hash of tags and functions (possibly extend to using sxpaths and multiple handlers)
(define (set-xmpp-handler type fcn)
(dict-set! xmpp-handlers type fcn))
(define (remove-xmpp-handler type fcn)
(dict-remove! xmpp-handlers type fcn))
(define (run-xmpp-handler type sz)
(let ((fcn (dict-ref xmpp-handlers type #f)))
(when fcn (begin
(debugf "attempting to run handler ~a.~%" fcn)
(fcn sz)))))
;; no real parsing yet. dispatches any received xml stanzas as sxml
(define (parse-xmpp-response str)
(when (> (string-length str) 0)
(let ((sz (ssax:xml->sxml (open-input-string (clean str)) '())))
;;(let ((sz (lazy:xml->sxml (open-input-string str) '())))
(cond
((equal? '(null) (cadr sz))
(newline))
((equal? 'message (caadr sz))
(run-xmpp-handler 'message sz))
((equal? 'iq (caadr sz))
(run-xmpp-handler 'iq sz))
((equal? 'presence (caadr sz))
(run-xmpp-handler 'presence sz))
(else (run-xmpp-handler 'other sz))))))
;; example handlers to print stanzas or their contents
(define (print-message sz)
(printf "a ~a message from ~a which says '~a.'~%" (message-type sz) (message-from sz) (message-body sz)))
(define (print-iq sz)
(printf "an iq response of type '~a' with id '~a.'~%" (iq-type sz) (iq-id sz)))
(define (print-presence sz)
(printf " p-r-e-s-e-n-e-c--> ~a is ~a" (presence-from sz) (presence-status)))
(define (print-stanza sz)
(printf "? ?? -> ~%~a~%" sz))
;; handler to print roster
(define (roster-jids sz)
((sxpath "iq/ns:query/ns:item/@jid/text()" '(( ns . "jabber:iq:roster"))) sz))
(define (roster-items sz)
((sxpath-element "iq/ns:query/ns:item" '(( ns . "jabber:iq:roster"))) sz))
(define (print-roster sz)
(when (and (string=? (iq-type sz) "result")
(string=? (iq-id sz) "roster_1"))
(printf "~a~%" (roster-jids sz))))
;; QND hack to filter out anything not a message, iq or presence
(define (clean str)
(let ((test (substring str 0 3)))
(cond ((string-ci=? test "<me") str)
((string-ci=? test "<iq") str)
((string-ci=? test "<pr") str)
((string-ci=? test "<ur") str)
(else
(debugf "~%recieved: ~a ~%parsed as <null/>~%~%" str)
"<null/>"))))
;; response handler
(define (xmpp-response-handler in)
(thread (lambda ()
(let loop ()
(parse-xmpp-response (read-async in))
(sleep 0.1) ;; slight delay to avoid a tight loop
(loop)))))
;; jid splicing (assuming the jid is in the format user@host/resource)
(define (jid-user jid)
(string-take jid (string-index jid #\@)))
(define (jid-host jid)
(let* ((s (string-take-right jid (- (string-length jid) (string-index jid #\@) 1)))
(v (string-index s #\/)))
(if v (string-take s v) s )))
(define (jid-resource jid)
(let ((r (jid-resource-0 jid)))
(if (void? r) (gethostname) r)))
(define (jid-resource-0 jid)
(let ((v (string-index jid #\/)))
(when v (string-take-right jid (- (string-length jid) v 1)))))
;;;; ;; ; ; ;; ;; ;;;; ;
;;
;; interfaces
;;
;;;;; ;; ;;;; ; ;; ;
(define xmpp-in-port (make-parameter #f))
(define xmpp-out-port (make-parameter #F))
(define (send str)
(debugf "sending: ~a ~%~%" str)
(let* ((p-out (xmpp-out-port))
(out (if p-out p-out xmpp-out-port-v)))
(fprintf out "~A~%" str) (flush-output out)))
(define-syntax with-xmpp-session
(syntax-rules ()
((_ jid pass form . forms)
(let ((host (jid-host jid))
(user (jid-user jid))
(resource (jid-resource jid)))
(let-values (((in out)
(ssl-connect host ssl-port 'tls)))
;;(tcp-connect host port)))
(parameterize ((xmpp-in-port in)
(xmpp-out-port out))
(file-stream-buffer-mode out 'line)
(xmpp-response-handler in)
(send (xmpp-stream host))
(send (xmpp-session host))
;(starttls in out)
(send (xmpp-auth user pass resource))
(send (presence))
(begin form . forms)
(close-output-port out)
(close-input-port in)))))))
;; NOTE: this will only work with a single connection to a host, however multiple sessions to that host may be possible
(define xmpp-in-port-v (current-input-port))
(define xmpp-out-port-v (current-output-port))
(define (start-xmpp-session jid pass)
(let ((host (jid-host jid))
(user (jid-user jid))
(resource (jid-resource jid)))
(let-values (((in out)
(ssl-connect host ssl-port 'tls)))
;;(tcp-connect host port)))
(set! xmpp-in-port-v in)
(set! xmpp-out-port-v out)
(file-stream-buffer-mode out 'line)
(xmpp-response-handler in)
(send (xmpp-stream host))
(send (xmpp-session host))
;;(starttls in out)
(send (xmpp-auth user pass resource))
(send (presence)))))
(define (close-xmpp-session)
(close-output-port xmpp-out-port-v)
(close-input-port xmpp-in-port-v))
) ;; end module