[Fluxus] problem from mexico
Dave Griffiths
dave at pawfal.org
Sun Apr 12 12:26:45 PDT 2009
oops... I just committed a fix for this...
On Sun, 2009-04-12 at 21:07 +0200, gabor papp wrote:
> > Last night I started with some tutorials and when I run the example of
> > recursion
> > (define (draw-row count)
> > (cond
> > ((not (zero? count))
> > (draw-cube)
> > (translate (vector 1.1 0 0))
> > (draw-row (- count 1)))))
> > (every-frame (draw-row 10))
> >
> > and nothing happens, I can't see a row of 10 cubes.
> the translate's get accumulated during the successive frames.
> try this:
>
> (define (draw-row count)
> (with-state
> (cond
> ((not (zero? count))
> (draw-cube)
> (translate (vector 1.1 0 0))
> (draw-row (- count 1))))))
>
> (every-frame (draw-row 10))
>
> or:
>
> (define (draw-row count)
> (cond
> ((not (zero? count))
> (identity)
> (translate (vector (* count 1.1) 0 0))
> (draw-cube)
> (draw-row (- count 1)))))
>
> (every-frame (draw-row 10))
>
>
> best,
> gabor
>
More information about the Fluxus
mailing list