[Fluxus] remove objects from the physics system
gabor papp
gabor.lists at mndl.hu
Mon May 25 00:47:00 PDT 2009
hi,
i added a new function that removes an object from the physics system.
this makes it possible to change object shapes in the simulation.
attached an example of a growing cube.
best,
gabor
;;;;
(clear)
(collisions 1)
(ground-plane #(0 1 0) 0)
(define box 0)
(for-each
(lambda (o)
(with-primitive o
(translate (crndvec)))
(active-box o))
(build-list 30 (lambda (x) (build-cube))))
(define start-time (time))
(define (animate)
(remove box)
(destroy box)
(set! box (build-cube))
(with-primitive box
(colour #(1 0 0))
(scale (- (time) start-time))
(translate #(0 .5 0)))
(active-box box))
(every-frame (animate))
More information about the Fluxus
mailing list