Skip to content

Instantly share code, notes, and snippets.

View quephird's full-sized avatar

danielle quephird

View GitHub Profile
@quephird
quephird / tennis_ball.clj
Created August 31, 2014 16:03
Once again, I'm riffing off/stealing from Bees and Bombs.
(ns fun-with-quil.tennis-ball
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(defn seam [θ w]
[(* 300 (sin (radians θ)) (cos (* w (cos (radians θ)))))
(* 300 (sin (radians θ)) (sin (* w (cos (radians θ)))))
(* 300 (cos (radians θ)))])
@quephird
quephird / breezy.clj
Last active August 29, 2015 14:05
This is another adaptation from a wonderful thread on SO: http://codegolf.stackexchange.com/questions/35569/tweetable-mathematical-art
(ns fun-with-quil.breezy
(:use quil.core))
(def ^:constant screen-w 1920)
(def ^:constant screen-h 1080)
(defn r ^double [^long x ^long y]
(loop [k 0 i 0.0 j 0.0]
(let [si (sin i)
cj (cos j)]
@quephird
quephird / wavey-thingy.clj
Created August 22, 2014 21:02
This is an attempt at gaining a slightly deeper understanding of the code presented here: http://codegolf.stackexchange.com/questions/35569/tweetable-mathematical-art#35689
(ns fun-with-quil.wavey-thingy
(:use quil.core))
(def screen-w 1024)
(def screen-h screen-w)
(defn make-wave-fn []
"[x1 y1] specifies the epicenter of the waves
[x2 y2] specifies an anti-epicenter of sorts
l controls the length between waves
@quephird
quephird / bullet_hell_game_recommendations.txt
Created August 7, 2014 01:14
Just a list of bullet hell/Danmaku/shmups that I highly recommend
Windows
----------
Blue Wish Resurrection Plus http://www004.upp.so-net.ne.jp/x_xgameroom/
eXceed2nd Vampire Rex http://store.steampowered.com/app/207380/
eXceed3rd Jade Penetrate http://store.steampowered.com/app/207400/
Anything by Zun, but Perfect Cherry Blossom is a classic http://www16.big.or.jp/~zun/html/th07.html
@quephird
quephird / tadpoles.clj
Last active August 29, 2015 14:00
Another blatant ripoff from this post: http://myartexperiments.tumblr.com/post/80601188764/tadpoles. My tadpoles aren't nearly as sharply defined as theirs but this is about as good as I can get mine for the moment.
(ns quil.tadpoles
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(def tadpoles (atom {}))
(defn- make-tadpole [max-x max-y max-r colors]
{:x (random max-x) ; Absolute x of center of revolution
@quephird
quephird / turbine.clj
Last active August 29, 2015 14:00
Clojure interpretation of this neat little post here: http://p5art.tumblr.com/post/83764524629/turbine-inspired-by-this-my-code-here
(ns quil.hello
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(def t (atom 0))
(defn setup []
(smooth)
@quephird
quephird / mushroom-clouds.clj
Created March 20, 2014 17:52
Another little challenge to myself to see if I could replicate someone else's Processing sketch without looking: http://www.openprocessing.org/sketch/140475
(ns fun-with-quil.mushroom-clouds
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(def phase (atom 0))
(defn setup []
(smooth)
@quephird
quephird / acid-rain.clj
Created March 20, 2014 14:18
A quickly written implementation using quil of this: http://pastebin.com/Wf9EZenN. I did it without looking at their code first.
(ns fun-with-quil.acid-rain
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(defn setup []
(smooth)
(no-stroke)
(background 0))
@quephird
quephird / procedural-lichens.clj
Last active August 29, 2015 13:57
This was a procedural version of drawing I made using ArtRage for the iPad and inspired by lichens: http://quephird.deviantart.com/art/lichens-434718646. This code makes me retch, but it's functional and I need to mull things over a bit before I return to it.
(ns procedural-lichens
(:use quil.core))
(def screen-w 2880)
(def screen-h 1800)
(def lichens (atom []))
(defn intersects? [[x1 y1 r1] [x2 y2 r2]]
"Determines if the two circles passed in intersect"
(ns fun-with-quil.sea-breeze
(:use quil.core))
(def dθ (atom 0))
(defn setup []
(background 0)
(ellipse-mode :center)
(no-stroke)
(smooth))