Created
December 31, 2016 04:55
-
-
Save technomancy/0a5f130288b6ed9ad2c6c4578ce8d41a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
;; module rotate_half() { | |
;; rotation_y_offset = 1.75 * column_spacing; | |
;; rz(angle, [hand_separation, rotation_y_offset]) { | |
;; children(); | |
;; } | |
;; } | |
(defn rotate-half | |
"Rotate the right half of the keys around the top left corner of | |
the thumb key. Assumes that the thumb key is a 1x1.5 key and that | |
it is shifted 0.5*column_spacing up relative to the nearest column." | |
[shape] | |
(let [rotation-y-offset (* 1.75 column-spacing)] | |
(translate [hand-separation rotation-y-offset 0] | |
(rotate angle | |
(translate (map - [hand-separation rotation-y-offset 0]) | |
shape))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment