diff --git a/src/aphorisms/twenty_four.clj b/src/aphorisms/twenty_four.clj new file mode 100644 index 0000000..c324ab4 --- /dev/null +++ b/src/aphorisms/twenty_four.clj @@ -0,0 +1,41 @@ +(ns aphorisms.twenty-four + (:require [quil.core :as q] + [quil.middleware :as qm] + [thi.ng.geom.rect :as r] + [thi.ng.geom.core :as g] + [thi.ng.math.core :as m])) + +;; I'm in bed. It is 9th of October, the temperatures are mild, the sund is +;; shining and my girlfriend is reading me texts about the physical appearance +;; of angels. + +(def bounds (r/rect 540 960)) + +(defn setup [] + (q/frame-rate 30) + (q/ellipse-mode :center) + (q/color-mode :hsb 100) + {}) + +(defn update-state [_] + _) + +(def alpha-step (/ 100 16)) + +(defn draw-state [_] + (q/with-translation (g/centroid bounds) + (q/background 0 0 0) + (dotimes [i 16] + (q/no-stroke) + (q/fill 100 (* alpha-step (- 16 (Math/abs (- 16 (* (inc i) 2)))))) + (q/ellipse 0 (* 48 (- i 7.5)) 128 128)))) + +#_:clj-kondo/ignore +(q/defsketch twenty-four + :title "Twenty-Four" + :size (:size bounds) + :settings #(q/pixel-density (q/display-density)) + :setup setup + :update update-state + :draw draw-state + :middleware [qm/pause-on-error qm/fun-mode]) diff --git a/src/aphorisms/twenty-one.clj b/src/aphorisms/twenty_one.clj similarity index 100% rename from src/aphorisms/twenty-one.clj rename to src/aphorisms/twenty_one.clj diff --git a/src/aphorisms/twenty-three.clj b/src/aphorisms/twenty_three.clj similarity index 100% rename from src/aphorisms/twenty-three.clj rename to src/aphorisms/twenty_three.clj diff --git a/src/aphorisms/twenty-two.clj b/src/aphorisms/twenty_two.clj similarity index 100% rename from src/aphorisms/twenty-two.clj rename to src/aphorisms/twenty_two.clj