Python Turtle: Simple Shell

Опубликовано: 15 Январь 2022
на канале: Basic Python Turtle Art
158
1

An image of a simple shell drawn with 36 lines of increasing lengths. The lines start from the same point and spread apart 10 degrees from each other.

Please free to copy and paste the following code. Enjoy!
import turtle
scrin = turtle.Screen()
scrin.bgcolor("light green")
#Drawing specifications
t = turtle.Turtle()
t.hideturtle()
t.speed(5)
t.pensize(4)
t.color("brown")
lin = 130
#Draw 36 lines from the center
for i in range(36):
#Locate center at (-42, 42), not (0, 0), to center shell on screen
t.penup()
t.goto(-42, 42)
t.pendown()
t.left(10)
#Make next line longer by 3.6 units
lin = lin + 4
t.forward(lin)

scrin.exitonclick()


На этой странице сайта вы можете посмотреть видео онлайн Python Turtle: Simple Shell длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Basic Python Turtle Art 15 Январь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 158 раз и оно понравилось 1 зрителям. Приятного просмотра!