Quil Test 001

{:deps {org.clojure/clojure {:mvn/version "1.10.1"}
        ;; complient is used for autocompletion
        ;; add your libs here (and restart the runtime to pick up changes)
        compliment/compliment {:mvn/version "0.3.9"}
        quil/quil {:mvn/version "4.0.0-SNAPSHOT-1"}}}
deps.edn
Extensible Data Notation
(System/setProperty "java.awt.headless" "true")
0.1s
Clojure
*ns*
0.2s
Clojure

Demo 1

Source: http://nbeloglazov.com/2014/05/29/quil-intro.html

(ns user (:require [quil.core :as q]))
3.4s
Clojure
;; source: https://landofquil.clojureverse.org/
;; This is the draw function which Quil will run
(defn draw-pine-forest []
  ;; First we set the stage: a background color, and no borders around shapes
  (q/background 20 200 151)
  (q/no-stroke)
  ;; Set a fill color for shapes. The numbers correspond with
  ;; red - green - blue, and go up to 255
  (q/fill 34 95 215)
  ;; Fill the width and height of the canvas with pine-forest
  (doseq [x (range 0 (q/width) 50)
          y (range 0 (q/height) 60)]
    (q/triangle (+ x 25) y
              x (+ y 50)
              (+ x 50) (+ y 50))
    (q/rect (+ x 16) (+ y 50) 16 10)))
(q/sketch
  :host "pine-forest"
  :size [300 300]
  :draw #'draw-pine-forest)
0.7s
Clojure
; define function which draws spiral
(defn draw []
  ; make background white
  (q/background 255)
  ; move origin point to centre of the sketch
  ; by default origin is in the left top corner
  (q/with-translation [(/ (q/width) 2) (/ (q/height) 2)]
   ; parameter t goes 0, 0.01, 0.02, ..., 99.99, 100
   (doseq [t (range 0 100 0.01)]
     ; draw a point with x = t * sin(t) and y = t * cos(t)
     (q/point (* t (q/sin t))
              (* t (q/cos t))))))
0.1s
Clojure
; run sketch
(q/defsketch trigonometry
  :size [300 300]
  :draw draw)
0.3s
Clojure

I am getting an error "Picked up _JAVA_OPTIONS: -XX:+UseG1GC" which causes the runtime to terminate. Google Search

Runtimes (1)