filmov
tv
Python Geometrical 72 Semi Circles.
Показать описание
This is the python code. If you have any questions please ask.
"""
import turtle
sides=72
radi = 400
# create turtle object
t = turtle.Turtle()
# set the pen size to 2
# define a function to draw a semicircle
def draw_semicircle(radius):
c = ["#FFFF99", "#FFFF66", "#FFCC00","#FFC300","#FF6600","black"]
# define a function to draw the cresents
def draw_four_semicircles(center, radius, sides):
for i in range(1):
draw_semicircle(radius)
draw_semicircle(-radius)
# draw four semicircles at right angles from the center point (0, 0) with radius 50
for i in range(sides):
cc = c[i%6]
draw_four_semicircles((0, 0), radi/2,sides)
#draw the rings
for i in range(21):
#print(i)
"""
"""
import turtle
sides=72
radi = 400
# create turtle object
t = turtle.Turtle()
# set the pen size to 2
# define a function to draw a semicircle
def draw_semicircle(radius):
c = ["#FFFF99", "#FFFF66", "#FFCC00","#FFC300","#FF6600","black"]
# define a function to draw the cresents
def draw_four_semicircles(center, radius, sides):
for i in range(1):
draw_semicircle(radius)
draw_semicircle(-radius)
# draw four semicircles at right angles from the center point (0, 0) with radius 50
for i in range(sides):
cc = c[i%6]
draw_four_semicircles((0, 0), radi/2,sides)
#draw the rings
for i in range(21):
#print(i)
"""