Skip to content

Instantly share code, notes, and snippets.

@technomancy
Created December 31, 2016 04:55
Show Gist options
  • Save technomancy/0a5f130288b6ed9ad2c6c4578ce8d41a to your computer and use it in GitHub Desktop.
Save technomancy/0a5f130288b6ed9ad2c6c4578ce8d41a to your computer and use it in GitHub Desktop.
;; 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