Simple Python Turtle Graphic and Code: Parallel Planes смотреть онлайн
A group of stacked parallelograms created by the "goto" method. To make the simple graphic more interesting, step-wise change in color of parallelograms was made using the screen.colormode(1.0) and the conventional formulas for change in r, g, and b were utilized in the short code.
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()
screen.colormode(1.0) #Requirement to use 0 to 1.0 as color values
t.pensize(4)
graphic_length = 600 #Changeable
graphic_height = 500 #Changeable
number_of_planes = 9 #Changeable
y = -0.5 * graphic_height #The y-coordinate of the drawing's starting point
change_in_y = graphic_height / (number_of_planes + 1) #Increment in value of y-coordinate for the next points
r1 = r = 1 #r, g, and b values for the initial color (r1, g1, b1); (1, 1, 1) for white in
g1 = g = 1 #this case
b1 = b = 1
r2 = 0 #Final color (r2, g2, b2); (0, 1, 0) for green in this case
g2 = 1
b2 = 0
change_in_r = (r2 - r1) / (number_of_planes - 1) #Increment in values of r, g, and b
change_in_g = (g2 - g1) / (number_of_planes - 1)
change_in_b = (b2 - b1) / (number_of_planes - 1)
def plane(y): #Procedure for drawing a plane
t.fillcolor(r, g, b) #Initial step to color-fill the current plane
t.begin_fill()
t.goto(0.25 * graphic_length, y) #Four consecutive "goto" methods or steps to draw the 4 sides of current plane
t.goto(0.5 * graphic_length, y + 2 * change_in_y)
t.goto(-0.25 * graphic_length, y + 2 * change_in_y)
t.goto(-0.5 * graphic_length, y)
t.end_fill()
for i in range(number_of_planes): #Python_Graphic start of drawing procedure; Loop to draw the indicated number of planes
t.penup()
t.goto(-0.5 * graphic_length, y) #Trail-less movement of turtle to the drawing's starting point
t.pendown()
plane(y) #Function call to draw a color-filled plane
y += change_in_y #Increment in y-coordinate for next plane
r += change_in_r #Increment in r, g, and b for next plane
g += change_in_g
b += change_in_b
t.hideturtle()
screen.exitonclick()
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Simple Python Turtle Graphic and Code: Parallel Planes» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.