Basic Python Turtle Code: Rainbow Twist

Опубликовано: 25 Апрель 2022
на канале: Basic Python Turtle Art
187
2

The rainbow colors used in a twisted and stylized asterisk. The colors are enclosed in circles that get smaller the farther they are from the image center.

Feel free to copy and paste the simple Python Turtle code that is given below. Don't hesitate to ask questions about the code if you have any. Please enjoy and subscribe! :)

import turtle
t = turtle.Turtle()
screen = turtle.Screen()
x = 23
rad = 2.2 * x
t.left(180)
def color_wheel(x):
for color in ["red", "orange", "yellow", "green", "blue", "indigo", "violet"]:
t.fillcolor(color)
t.begin_fill()
t.circle(x)
t.end_fill()
t.penup()
t.circle(rad,360 / 7)
t.pendown()
for j in range(8):
t.penup()
t.goto(0, rad)
t.circle(rad, (360 / 7) / 8 * j)
t.pendown()
color_wheel(x)
x -= 2
rad += 2 * x
t.right((360 /7) / 8 * j)
t.ht()
screen.exitonclick()


На этой странице сайта вы можете посмотреть видео онлайн Basic Python Turtle Code: Rainbow Twist длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Basic Python Turtle Art 25 Апрель 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 187 раз и оно понравилось 2 зрителям. Приятного просмотра!