
/g,">").replace(/"/g,""").replace(/'/g,"'")}let o={},c=[];function d(e,n,t){o={...o,dynamic:e,core:n,leinProject:t}}function h(){c=["wh","with-style"]}window.onload=()=>{let{dynamic:n,core:t,leinProject:r}=o;if(n&&(document.getElementById("code-dynamic").innerHTML=s(n)),t&&(document.getElementById("code-core").innerHTML=s(t)),r&&(document.getElementById("code-lein-project").innerHTML=s(r)),c){let e={wh:';; Copyright (c) 2016 Tyler Hobbs\n;; MIT License\n;; https://github.com/thobbs/genartlib/\n(defn h\n "Returns a given percentage of the height Quil-specific."\n ([] (h 1.0))\n ([percentage] (* (height) percentage)))\n\n;; Copyright (c) 2016 Tyler Hobbs\n;; MIT License\n;; https://github.com/thobbs/genartlib/\n(defn w\n "Returns a given percentage of the width. Quil-specific."\n ([] (w 1.0))\n ([percentage] (* (width) percentage)))\n',"with-style":"(defmacro with-style [& body]\n `(do\n (q/push-style)\n (try\n ~@body\n (finally (q/pop-style)))))\n"},n=c.map(n=>e[n]).join("\n");document.getElementById("code-helpers").innerHTML=s(n)}e(i).addPlugin((0,a.number)()),e(i).highlightAll()}}),a("2tEiH",function(e,t){n(e.exports,"number",()=>r);let r=e=>({"after:highlightElement":({el:e,result:n,text:t})=>{let r=n.value.split("\n");r.pop();let i=r.length.toString().length,l=r.map((e,n)=>{let t=(n+1).toString().padStart(i);return`${e}`}).join("\n");e.innerHTML=l}})}),l("d3dEA"),l("7Y8VX");var s=l("gUHNU");(0,s.make)("(ns sketch.dynamic\n (:require [artlib.quil.global :refer :all]\n [genartlib.util :refer [w h]]\n [easings.core :as ease]\n [artlib.color.dictionary :as color-dict]\n [artlib.modulation :as modulate]\n [quil.core :as q]))\n\n(let [sin-30 (Math/sin (/ Math/PI 6))\n cos-30 (Math/cos (/ Math/PI 6))\n cd (color-dict/init)\n palette (color-dict/get-combination-hsb cd :305)]\n (defn draw [state]\n (q/background 0 0 95)\n\n (let [frame (:frame state)\n f (/ frame 300)\n grid-w 0.09\n grid-h grid-w\n fill 0.7]\n (doseq [[idx y] (map-indexed vector (range 0 (+ 1 grid-h) (/ grid-h 2)))]\n (doseq [x (sort \n #(compare (abs (- 0.5 %2)) (abs (- 0.5 %1)))\n (range 0 (+ 1 grid-w) grid-w))]\n (let [tri (fn [t] (* 2 (- t (Math/floor (+ t 0.5)))))\n \n n2 (q/noise \n (* (abs (- x 0.5)) 0.9) \n (* (abs (- y 0.5)) 0.9)\n 3.172)\n [hue sat bri] (first (drop (int (* n2 12)) (cycle palette)))\n n2 (q/noise \n (* (abs (- x 0.5)) 0.8) \n (* (abs (- y 0.5)) 0.8)\n (* 0.1 (Math/cos (* f Math/TAU))))\n n2 (ease/ease-in-out-sine (* (tri f) n2 2.5))\n fill (- fill (* n2 0.5))\n\n x (if (odd? idx) x (+ x (/ grid-w 2)))\n y2 (- y (* grid-h fill))\n\n l (- x (* cos-30 grid-w fill))\n r (+ x (* cos-30 grid-w fill))\n u (+ y (* sin-30 grid-h fill))\n d (- y (* sin-30 grid-h fill))\n u2 (+ y2 (* sin-30 grid-h fill))\n d2 (- y2 (* sin-30 grid-h fill))\n \n f2 (mod (+ (* x 0.5) (* y 0.5) (* f 5.0)) 1.0)]\n (with-style\n (q/stroke-weight (w 0.003))\n (q/stroke 0 0 95)\n (q/fill hue sat bri 0.7)\n (q/begin-shape)\n (q/vertex (w l) (h y2))\n (q/vertex (w x) (h u2))\n (q/vertex (w r) (h y2))\n (q/vertex (w x) (h d2))\n (q/end-shape :close))\n\n (with-style\n (q/stroke-weight (w 0.003))\n (q/stroke 0 0 95)\n (q/fill hue sat (- bri 10))\n (q/begin-shape)\n (q/vertex (w l) (h y2))\n (q/vertex (w x) (h u2))\n (q/vertex (w x) (h u))\n (q/vertex (w l) (h y))\n (q/end-shape :close))\n\n (with-style\n (q/stroke-weight (w 0.003))\n (q/stroke 0 0 95)\n (q/fill hue sat (- bri 15))\n (q/begin-shape)\n (q/vertex (w x) (h u2))\n (q/vertex (w r) (h y2))\n (q/vertex (w r) (h y))\n (q/vertex (w x) (h u))\n (q/end-shape :close))))))))\n",'(ns sketch.core\n (:require [artlib.quil.middleware :refer [animation-mode]]\n [clojure.core.matrix :refer [set-current-implementation]]\n [quil.middleware :as qm]\n [sketch.dynamic :as dynamic]\n [quil.core :as q]))\n\n(set-current-implementation :vectorz)\n(println)\n\n(q/defsketch example\n :title "genuary-2025-05"\n :setup (fn [] {})\n :draw dynamic/draw\n :update identity\n :size [1080 1080]\n :animation {:render? false :dirname "1"}\n :middleware [qm/fun-mode animation-mode])\n\n','(defproject genuary-2025-01-05 "0.1.0-SNAPSHOT"\n :description "FIXME: write description"\n :url "https://example.com/FIXME"\n :license {:name "Apache License, Version 2.0"\n :url "https://www.apache.org/licenses/LICENSE-2.0.html"}\n :dependencies [[org.clojure/clojure "1.11.1"]\n [com.dedovic/artlib-core "0.0.11"]\n [com.dedovic/easings-clj "0.1.0"]\n [genartlib/genartlib "1.0.0"]] ; utility functions\n :jvm-opts ["-Xms4000m" "-Xmx4000M" ; 4GB heap size\n "-server"\n "-Dsun.java2d.uiScale=1.0"] ; adjust scaling for high DPI displays\n :source-paths ["src/clj"]\n :java-source-paths ["src/java"]\n :resource-paths ["resources"])\n'),(0,s.withDefaultHelpers)();
dynamic.clj
core.clj
helpers
project.clj