Last active
March 6, 2019 01:05
-
-
Save primaryobjects/e24fb2676fb06c7cb8dbfc6a0c849a98 to your computer and use it in GitHub Desktop.
Drawing a face by calculating the x,y points along a circle's circumference for https://easyprog.online/ide/
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
# A face! | |
subr circle | |
for t = 0 to 360 | |
x1 = round (r * cos (t)) | |
y1 = round (r * sin (t)) | |
point x + x1 y + y1 | |
. | |
. | |
# Main face. | |
r = 20 | |
x = 60 | |
y = 30 | |
color 909 | |
call circle | |
# Left eye. | |
r = 5 | |
x = 55 | |
y = 20 | |
call circle | |
# Right eye. | |
x = 65 | |
call circle | |
# Nose. | |
x = 60 | |
y = 30 | |
color 060 | |
call circle | |
# Mouth. | |
color 589 | |
move 50 42 | |
line 70 42 | |
line 75 37 | |
move 50 42 | |
line 45 37 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment