Created
February 6, 2016 13:47
-
-
Save sasaki-shigeo/ccacdd90794b97ab6e64 to your computer and use it in GitHub Desktop.
A clock face / 時計の文字盤
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
| size(500, 500); | |
| float r = min(width, height) / 2; | |
| translate(width / 2, height / 2); | |
| strokeCap(SQUARE); | |
| strokeWeight(10); | |
| for (int i = 0; i < 12; i++) { | |
| line(0.88 * r * cos(radians(30 * i)), 0.88 * r * sin(radians(30 * i)), | |
| 0.98 * r * cos(radians(30 * i)), 0.98 * r * sin(radians(30 * i))); | |
| } | |
| strokeWeight(12); | |
| for (int i = 0; i < 4; i++) { | |
| line(0.85 * r * cos(radians(90 * i)), 0.85 * r * sin(radians(90 * i)), | |
| 0.98 * r * cos(radians(90 * i)), 0.98 * r * sin(radians(90 * i))); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment