<commit_before>(ns org.playasophy.wonderdome.geometry.layout-harness
  (:require
    (org.playasophy.wonderdome.geometry
      [cartesian :as cartesian]
      [geodesic :as geodesic]
      [layout :as layout])
    (org.playasophy.wonderdome.util
      [color :as color]
      [quil :refer [scale-point draw-axes]])
    [quil.core :as quil]))


;;;;; DRAWING FUNCTIONS ;;;;;

(def dome-struts
  (layout/geodesic-dome 3.787))


(defn- draw-dome
  [edges]
  (quil/stroke (quil/color 96 128))
  (quil/stroke-weight 3)
  (let [sorted-edges (map vector (range) edges)]
    (doseq [[i [a b]] sorted-edges]
      (quil/line
        (scale-point a)
        (scale-point b))
      (apply quil/text (str i)
        (scale-point (cartesian/midpoint 1/2 a b))))))



;;;;; SKETCH FUNCTIONS ;;;;;

(defn- setup
  []
  (quil/frame-rate 30)
  (quil/text-font (quil/create-font "Courier" 18 true))
  (quil/background 0))


(defn- render
  []
  (quil/background 0)
  (quil/translate (* 0.50 (quil/width)) (* 0.50 (quil/height)) 0)
  (quil/rotate-x 0.0 #_ 1.2)
  ;(quil/rotate-z (* (quil/frame-count) 0.003))
  (draw-axes 0.5)
  (draw-dome dome-struts))


(defn start!
  "Creates and starts a sketch to demonstrate the audio input functionality."
  []
 (quil/sketch
    :title "Wonderdome Geodesic Layout Harness"
    :features [:resizable]
    :setup #'setup
    :draw #'render
    :size [1000 600]
    :renderer :opengl))
<commit_msg>Update layout-harness ns.<commit_after>(ns org.playasophy.wonderdome.geometry.layout-harness
  (:require
    (org.playasophy.wonderdome.geometry
      [cartesian :as cartesian]
      [geodesic :as geodesic]
      [layout :as layout])
    (org.playasophy.wonderdome.util
      [color :as color]
      [quil :refer [scale-point draw-axes]])
    [quil.core :as quil]))


;;;;; DRAWING FUNCTIONS ;;;;;

(def dome-struts
  (layout/geodesic-dome 3.787))


(defn- draw-dome
  []
  (quil/stroke (quil/color 96 128))
  (quil/stroke-weight 3)
  (doseq [[[a b] i] (map vector dome-struts (range))]
    (quil/line
      (scale-point a)
      (scale-point b))
    (apply quil/text (str i)
      (scale-point (cartesian/midpoint 1/2 a b)))))



;;;;; SKETCH FUNCTIONS ;;;;;

(defn- setup
  []
  (quil/frame-rate 30)
  (quil/text-font (quil/create-font "Courier" 18 true))
  (quil/background 0))


(defn- render
  []
  (quil/background 0)
  (quil/translate (* 0.50 (quil/width)) (* 0.50 (quil/height)) 0)
  (quil/rotate-x 0.0 #_ 1.2)
  ;(quil/rotate-z (* (quil/frame-count) 0.003))
  (draw-axes 0.5)
  (draw-dome))


(defn start!
  "Creates and starts a sketch to demonstrate the audio input functionality."
  []
 (quil/sketch
    :title "Wonderdome Geodesic Layout Harness"
    :features [:resizable]
    :setup #'setup
    :draw #'render
    :size [1000 600]
    :renderer :opengl))

{'fraction_non_alphanumeric': 0.16576964477933262, 'fraction_numerical': 0.030139935414424113, 'mean_word_length': 2.9658605974395447, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2011196', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1096, 'n_words': 251}