[Fluxus] HelloWorld
Pete Carss
dmtquarter at googlemail.com
Fri Feb 26 06:16:39 PST 2010
Hello all,
I've been corresponding with Dave, preparing for an even in our dome on
Saturday. I'm having trouble with instancing when used in combination with
(dome-pixels) - it was suggested that the conversation was better suited to
this list...
(require fluxus-017/planetarium)
(define dome (dome-build 6 180 2048))
(define myobj (with-pixels-renderer (dome-pixels)
(build-nurbs-sphere 8 10))) ; make a sphere
(define (render-spheres n)
(cond ((not (zero? n))
(with-state
(translate (vector n 0 0)) ; move in x
(draw-instance myobj)) ; stamp down a copy
(render-spheres (- n 1))))) ; recurse!
;set the view of the camera
(dome-setup-main-camera 1400 1050)
(every-frame
(with-pixels-renderer (dome-pixels)
(translate (vector 0 100 -100))
(render-spheres 10))) ; draw 10 copies
This is an example, which includes adding (with-pixels-renderer) to the
definition of myobj, but I get no spheres at all now...?
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20100226/19fac43e/attachment-0002.htm>
More information about the Fluxus
mailing list