;; hackpact day 29 - cmyk ;; gabor papp http://mndl.hu/hackpact (clear) (define s 512) (scale #(20 16 1)) (translate #(-.5 -.5 0)) (define px0 (build-pixels s s #t)) (with-primitive px0 (scale 0)) (define p0 (ffgl-load "cicmykhalftone" s s)) (define px1 (build-pixels s s)) (with-ffgl p0 (ffgl-process px1 px0)) (define (anim) (with-ffgl p0 (ffgl-set-parameter! #:width 3 #:sharpness .9 #:center-x (sin (* .000821108 (time))) #:center-y (cos (* .00090606 (time))))) (with-pixels-renderer px0 (let ([a (ga)]) (for ([i (in-range 128)]) (with-state (colour (abs (vector-ref a i))) (translate (vector 0 (/ (- i 64) 8) 0)) (scale #(20 16/128 1)) (draw-cube)))))) (every-frame (anim))