This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def w 20) | |
(def h (/ w 2)) | |
(def items 4) | |
(def size (* w items)) | |
(def r (/ w (sqrt 3))) | |
(def cyan "#00FFFF") | |
(def magenta "#FF00FF") | |
(def yellow "#FFFF00") | |
(def black "#000000") | |
(defn color [i] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def size 600) | |
(def half (/ size 2)) | |
(def center [half half]) | |
(def cyan "#00FFFF") | |
(def magenta "#FF00FF") | |
(def yellow "#FFFF00") | |
(def black "#000000") | |
(defn color [i] | |
(case (mod i 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def size 200) | |
(def half (/ size 2)) | |
(def center [half half]) | |
(defn k [i] (pow (/ (sqrt 2) 2) i )) | |
(defn kr [i] (* half (k i))) | |
(defn krect [i] | |
(rect | |
[ | |
(- half (kr i)) | |
(- half (kr i)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def field 200) | |
(defvar width 40) | |
(def height (/ width 2)) | |
(def sq (* (* (sqrt 2) height) 2)) | |
(defn row [x i] | |
(rect [x 0 | |
(if (even? i) width height) | |
(if (even? i) height width) | |
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar size 200) | |
(def r (- (/ size 2) 4)) | |
(def center [(/ size 2) (/ size 2)]) | |
(defvar r2 40) | |
(defvar length 24) | |
(def step (/ 1 length)) | |
(def A (circle center r)) | |
(def B (circle center (- r r2))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Loaded from "https://gist.githubusercontent.com/cieloazul310/af30d75f11f5772461e1a7b267a2a98a/raw/eb1e9b7b1fe5ca203f122766e106411ab57c2b3a/sketch_sep-10-2020_16-36-07.glisp" | |
(defvar size 200) | |
(def r (- (/ size 2) 4)) | |
(def center [(/ size 2) (/ size 2)]) | |
(defvar r2 40) | |
(defvar length 24) | |
(def step (/ 1 length)) | |
(deftime time 0) |
OlderNewer