
/g,">").replace(/"/g,""").replace(/'/g,"'")}let c={},o=[];function d(e,n,t){c={...c,dynamic:e,core:n,leinProject:t}}function h(){o=["wh","with-style"]}window.onload=()=>{let{dynamic:n,core:t,leinProject:r}=c;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)),o){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=o.map(n=>e[n]).join("\n");document.getElementById("code-helpers").innerHTML=s(n)}e(a).addPlugin((0,l.number)()),e(a).highlightAll()}}),l("3PmhV",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 a=r.length.toString().length,i=r.map((e,n)=>{let t=(n+1).toString().padStart(a);return`${e}`}).join("\n");e.innerHTML=i}})}),i("d3dEA"),i("7Y8VX");var s=i("dZ8Um");(0,s.make)("(ns sketch.dynamic\n (:require ; [clojure.java.shell :refer [sh]]\n ; [genartlib.algebra :refer :all]\n ; [genartlib.curves :refer :all]\n ; [genartlib.geometry :refer :all]\n ; [genartlib.random :refer :all]\n ; [kdtree :as kd]\n [easings.core :as ease]\n [artlib.quil.global :refer :all]\n [genartlib.util :refer [w h]]\n [quil.core :as q]))\n\n(defn wobble [x t]\n (let [scale 1\n theta (* x Math/PI 2)\n y (Math/sin theta)\n theta (+ #_(+ (* Math/PI 2 y) 3.1)\n (+ (* Math/PI 2 t) 1.2)\n (+ (* Math/PI 2 x) x))\n y2 (Math/sin theta)\n theta (+ (* Math/PI 2 y)\n (* Math/PI 2 y2)\n (* Math/PI 2 t))\n y (* scale (Math/sin theta))]\n y))\n\n(defn draw [state]\n\n (let [frame (:frame state)\n f (/ frame 300)\n num-rows 20 #_(+ 10 (* 7 (Math/cos (* Math/PI 2 f))))\n y-step (/ 1 num-rows)\n y-scale (* y-step 1/2 0.9)\n y-scale (* 2 y-scale (+ (Math/sin (* Math/PI 1 f)) 0.05))\n pad (* y-step 1/2)\n times 10]\n\n (q/background (+ 180 (* 180 (Math/sin (* Math/PI 2 f)))) 10 100)\n\n ;; scuffs\n (with-style\n (q/stroke-weight (w 0.001))\n (q/stroke 0 0 40 0.03)\n (dotimes [_ 5000]\n (apply q/line (repeatedly 4 #(w (- (rand 1.4) 0.2))))))\n\n (with-style\n (q/stroke-weight (w 0.002))\n (q/stroke 0 0 0)\n (q/no-fill)\n\n (doseq [y (range (* pad 3) (+ (- 1 pad pad pad) y-step -1e-5) y-step)]\n (dotimes [n times]\n (let [scale (/ 1 (- times n))\n scale (ease/ease-out-circ scale)]\n (q/stroke 0 0 0 (/ 1 (- times n)))\n (q/begin-shape)\n (doseq [x (range 0.05 0.955 0.005)]\n (let [b (+ x (* 0.1 (Math/sin (+ (* Math/PI 2 f)\n (* y Math/PI 2)))))\n a (* scale y-scale (wobble b f))\n c (+ 0.5 (* 0.5 (Math/sin (+ (* 3/2 Math/PI) (* Math/PI f 2)))))\n y (+ (* c (- y 0.5)) a 0.5)]\n (q/curve-vertex (w x) (h y))))\n (q/end-shape)))))\n ))\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-2024-13"\n :setup (fn [] {})\n :draw dynamic/draw\n :update identity\n :size [1080 1080]\n :animation {:render? true :dirname "1"}\n :middleware [qm/fun-mode animation-mode])\n\n','(defproject genuary-2024-13 "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/easings-clj "0.1.0"]\n [com.dedovic/artlib-core "0.0.10"]\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