Skip to content

Instantly share code, notes, and snippets.

@jsilence
Last active December 16, 2015 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsilence/5411564 to your computer and use it in GitHub Desktop.
Save jsilence/5411564 to your computer and use it in GitHub Desktop.
Simple Fluxus sketch. Fluctuating colour pattern made with perlin noise. Fluctuating opacity with snoise, generating a nice pattern. Zooming the camera into the layer of cubes and pointing it towards the edges or corners makes some nice perspectives. Variation of https://gist.github.com/jsilence/5411516
(clear)
(translate (vector -9.5 -8 0))
(opacity .2)
(hint-ignore-depth)
(blend-mode 'src-alpha 'one)
(define (ani)
(for* ([i (in-range 33)]
[j (in-range 20)])
(with-state
(translate (vector (* .6 i) (* .9 j) 0))
(rotate (vector 0 0 (+ 2 i (* .9 j (time)))))
(scale (+ 1.8 (* .8 (sin(* .21 (time)))) (* .4 (atan(* 3 (time))))))
(colour (vector (noise .09 (+ (* .052 i) (* .1 (time))))
(noise .1 (+ (* .041 j) (* .08 (time))))
(noise .5 (+ (* .0524 j) (* .09 (time))))))
(opacity (+ .1 (* .1 (snoise (* 5 j) (+ (* .8 i) (* .3 (time)))))))
(draw-cube)
)
)
)
(every-frame (ani))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment