-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharch_spiral.py
More file actions
36 lines (32 loc) · 1.07 KB
/
arch_spiral.py
File metadata and controls
36 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
###############################################################################
# Description: Create an arch spiral using radians and degrees with respect to x and y axis
###############################################################################
from turtle import *
from math import *
def main():
# Don't change this block -------------------------------------------------
setup(564, 564)
width('5')
# -------------------------------------------------------------------------
# Write your mainline logic here ------------------------------------------
#color("black")
#down()
#radius = 180
#up()
#radius = degrees * (pi/180)
#for t in range(3):
#x =
#goto(0,0)
#radians = (degress * pi) / 180
down()
speed(10)
for degrees in range(2161):
radians = (degrees / 180) * pi
x = (degrees / 10) * cos(radians)
y = (degrees / 10) * sin(radians)
goto(x,y)
up()
# Don't change this -----------------------------------------------------------
if __name__ == '__main__':
main()
done()