Last active
February 7, 2016 14:04
-
-
Save sasaki-shigeo/a082d441adbc5248fac5 to your computer and use it in GitHub Desktop.
A Clock Face in Arabic Numerals / 算用数字の時計の文字盤
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); | |
| int font_px = min(width, height) / 16; | |
| float r = min(width, height) / 2 - font_px; | |
| textSize(font_px); | |
| textAlign(CENTER, CENTER); | |
| translate(width / 2, height / 2); | |
| fill(0); | |
| for (int i = 1; i <= 12; i++) { | |
| text("" + i, r * cos(radians(30 * i - 90)), r * sin(radians(30 * i - 90))); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment