Created
September 10, 2020 07:36
-
-
Save cieloazul310/af30d75f11f5772461e1a7b267a2a98a to your computer and use it in GitHub Desktop.
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))) | |
(defn item [n] | |
(path/subtract | |
(path/transform | |
(path/align-at n B) | |
(circle [0 0] r2) | |
) | |
(path/unite | |
(path/transform | |
(path/align-at (mod (- n step) ) B) | |
(circle [0 0] r2) | |
) | |
(path/transform | |
(path/align-at (mod (+ n step) 1) B) | |
(circle [0 0] r2) | |
) | |
) | |
) | |
) | |
(artboard { | |
:bounds [0 0 size size] | |
} | |
(style [(fill "#334")] | |
(for [n (range 0 1 (* step 2))] | |
(item n) | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment