Skip to content

Instantly share code, notes, and snippets.

@bobbywilson0
Forked from PGGB/gist:4157429
Last active August 29, 2015 14:06
Show Gist options
  • Save bobbywilson0/780db19ef0f3b9c1d24c to your computer and use it in GitHub Desktop.
Save bobbywilson0/780db19ef0f3b9c1d24c to your computer and use it in GitHub Desktop.
(ns noc.core
(:use quil.core))
(defn setup []
(background 255)
(no-loop))
(defn draw []
(pixels)
(doseq [x (range 0 (width))
y (range 0 (height))]
(let [bright (map-range (noise (* x 0.05) (* y 0.05)) 0 1 0 255)]
(aset-int (pixels) (+ x (* y (width))) (color bright))))
(update-pixels))
(defsketch noc
:setup setup
:draw draw
:size [640 320]
:renderer :p2d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment