Created
April 15, 2020 15:37
-
-
Save villares/9bcc9710eea8203899c63b941bbc994a 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
| def inicie_caneta(*args): | |
| global caneta | |
| caneta = True | |
| resetMatrix() | |
| if args: | |
| x, y = args | |
| translate(x, y) | |
| else: | |
| translate(width / 2, height / 2) | |
| rotate(HALF_PI) | |
| def va_para(x, y): | |
| resetMatrix() | |
| translate(x, y) | |
| def suba_caneta(): | |
| global caneta | |
| caneta = False | |
| def baixe_caneta(): | |
| global caneta | |
| caneta = True | |
| def ande(n): | |
| if caneta: | |
| line(0, -n, 0, 0) | |
| translate(0, -n) | |
| def vire(a): | |
| rotate(radians(-a)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment