-
-
Save bobbywilson0/780db19ef0f3b9c1d24c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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