Skip to content

Instantly share code, notes, and snippets.

@johnwalker
Created December 22, 2013 00:20
Show Gist options
  • Save johnwalker/8076971 to your computer and use it in GitHub Desktop.
Save johnwalker/8076971 to your computer and use it in GitHub Desktop.
(ns legendre-image
(:use quil.core))
(declare compute-legendres)
(defn setup []
(smooth)
(background 255 255 255)
(stroke 255 255 255)
(stroke-weight 1)
(frame-rate 1)
(let [cols (mapv rand [50 0 200 200])]
(doseq [[y x c] (compute-legendres 42 300)]
(when (== 1 c)
(apply fill cols)
(apply stroke cols)
(ellipse (* x 5) (* y 5) 5 5)))))
(defsketch legendre-sketch
:title "Legendre"
:setup setup
:size [1350 210])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment