RUVIDEO
Поделитесь видео 🙏

Simple Python Turtle Graphic and Code: Solomon's Knot смотреть онлайн

📁 Обучение 👁️ 16 📅 03.12.2023

Solomon's Knot created with 4 J-shaped portions to illustrate overlap of strings. The background started as off-white -- red in this case -- to show the white ink of the turtle as it navigates over the screen, and ended as conventional white when the graphic is fully drawn.

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 more graphics and variations, please visit my author url at https://www.amazon.com/author/basicpythonturtleart.url


import turtle
t = turtle.Turtle() #Definitions and Initializations
screen = turtle.Screen()
t.pensize(8) #Thick pensize to highlight overlaps of string portions
t.pencolor("white") #"White" to make string overlaps clearer
screen.bgcolor("red") #Off-white background initially to easily track turtle's white trails
string_width = 80 #Changeable to alter size of graphic
def string_portion(): #Procedure for drawing a string portion that is not hiden by another one
t.fillcolor("black") #Color of string in knot
t.begin_fill() #(To understand better the stepd below, please re-watch video.)
t.forward(string_width) #Movement of turtle over string width
t.left(90) #Direction of turtle to draw next string edge
t.forward(3 * string_width) #Straight, outer edge of string
t.circle(string_width, 90) #One outer edge of string bend
t.forward(string_width) #Straight, outer edge of string
t.circle(string_width, 90) #Another outer edge of string bend
t.forward(string_width) #Straight, outer edge of string
t.left(90) #Direction of turtle to draw over string width and into inner edge
t.forward(string_width) #Straight line running over string width
t.left(90) #Direction of turtle to draw inner edge of string
t.forward((2 / 3) * string_width) #Straight, inner edge of string
t.circle((-1 / 3) * string_width, 90) #One inner edge of string bend
t.forward((1 / 3) * string_width) #Straight, inner edge of string
t.circle((-1 / 3) * string_width, 90) #Another inner edge of string bend
t.forward((8 / 3) * string_width) #Straight, inner edge of string
t.end_fill()
t.penup() #Python_graphic start of drawing procedure
for i in range(4): #For 4 string portions in the whole Solomon's Knot
t.left(i * 90) #Direction of turtle before drawing a string portion
t.forward((1 / 2) * string_width * 2 ** (1 / 2)) #Trail-less movement of turtle to starting point of drawing
t.left(45) #Turtle redirection at point of drawing start
t.pendown() #Preparation to ink movement of turtle
string_portion() #Function call to draw the current string portion
t.penup() #For trail-less movement of turtle after a string portion is drawn
t.home() #Trail-less return of turtle to default position and direction
screen.bgcolor("white") #Return to default background after temporarily using red
t.hideturtle()
screen.exitonclick()

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Simple Python Turtle Graphic and Code: Solomon's Knot» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.