[Fluxus] parenting and frames of reference

Dave Griffiths dave at pawfal.org
Thu Aug 20 01:41:50 PDT 2009


On Sat, 2009-08-15 at 01:39 +0200, Kassen wrote:
>     (spawn-task ( lambda () (with-primitive a (rotate (vector 0 (* 45
> (delta)) 0)))) 'mill-turn)

Just for the record, I probably wouldn't use spawn-task in this way -
I'd make a list of the axle objects you want to rotate, and do something
like this:

(clear)

(define axles (build-list 10 
  (lambda (i) 
    (with-state  
      (translate (vector (* i 2) 0 0))
      (build-cube)))))

(every-frame
  (for-each
    (lambda (axle)
      (with-primitive axle
        (rotate (vector 0 0 (* 45 (delta))))))
  axles))

cheers,

dave




More information about the Fluxus mailing list