Simple Python Turtle Graphic and Code: No U Turn
The traffic sign for No U Turn created with concentric, differently-sized circles for the circular band, and a superimposed rectangle for the slanting red bar.
Feel free to copy the basic Python Turtle code that is given below. Don't hesitate to ask questions about the code if you have any. Enjoy! Please comment, like, or subscribe :)
Incidentally, for manually colorable graphics and variations, please visit my author site at https://www.amazon.com/author/basicpythonturtleart.url
import turtle
t = turtle.Turtle() #Definitions and Initializations
screen = turtle.Screen()
t.pensize(4)
radius = 250 #Changeable; Radius or size of graphic
def circular_band(r): #Procedure for drawing the red circular band
t.color("red") #Color for pen and fill; can be placed before the function call for circular_band(r)
for i in range(2): #Loop to draw concentric circles - the bigger red and the smaller white
t.begin_fill() #t.color_fill() skipped because of specified fill color in t.color("red")
t.circle(r) #Use of variable r for longer and shorter radii corresponding to concentric circles
t.end_fill()
t.color("red", "white")
r = 4 * radius / 5
t.goto(r, 0)
def U_sign(): #Procedure for drawing the black U sign
t.begin_fill()
t.forward(17 * radius / 20) #Use of denominator 20 all throughout to facilitate comparison of lengths, and
t.circle((7 / 20) * radius, 180) #quantity radius to indicate the measurement basis
t.forward((11 / 20) * radius)
t.right(90)
t.forward((4 / 20) * radius)
t.left(135)
t.forward((6 / 20) * (2 ** 0.5) * radius)
t.left(90)
t.forward((6 / 20) * (2 ** 0.5) * radius)
t.left(135)
t.forward((4 / 20) * radius)
t.right(90)
t.forward((11 / 20) * radius)
t.circle((- 3 / 20) * radius, 180)
t.forward((17 / 20) * radius)
t.left(90)
t.forward((4 / 20) * radius)
t.end_fill()
def bar(): #Procedure for drawing the red slant bar
t.begin_fill()
for i in range(2): #Loop to draw 2 identical boundaries of the bar
t.forward((2 / 20) * radius)
t.left(90)
t.forward((36 / 20) * radius)
t.left(90)
t.forward((2 / 20) * radius)
t.end_fill()
t.penup() #Python-Graphic start of drawing procedure
t.forward(radius)
t.left(90)
t.pendown()
circular_band(radius) #Function call to draw the red circular band with initial radius
t.penup()
t.home()
t.goto(7 * radius / 20, -11 * radius / 20)
t.setheading(90)
t.color("black")
t.pendown()
U_sign() #Function call to draw the black U sign
t.penup()
t.home()
t.setheading(315)
t.forward((18 / 20) * radius)
t.left(90)
t.color("red")
t.pendown()
bar() #Function call to draw the red slanting bar
screen.exitonclick()
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Simple Python Turtle Graphic and Code: No U Turn», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.