Simple Python Turtle Graphic and Code: Star Disk смотреть онлайн
A disk made up of groups of strands or flake-like shapes. The visual appeal is enhanced by the decreasing size and changing hue of strands or flakes in each group. The simple Python Turtle code uses 45 lines only.
Feel free to copy the simple 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)
screen.colormode(1.0) #Requirement for use of 0 to 1.0 as red, green, and blue values for colors
radius = 250 #Changeable; Distance from center to edge of graphic
colors_per_set = 4 #Changeable; Count of hues from initial r1, g1, and b1 to final r2, g2 and b2
sets_of_colors = 5 #Changeable; Count of groups of hues
downsizer = 1 #Changeable; Diminishing factor for strand -- a flake radiating from center
r1 = r = 1 #Changeable; Assigned values for the r1, g1, and b1 -- components of initial
g1 = g = 0 #color; Initial values for r, g, and b -- variables for changing hues;
b1 = b = 0 #(1, 0, 0) or red as initial color
r2 = 1 #Changeable; Assigned values for the r2, g2, and b2 -- components of final color;
g2 = 1 #(1, 1, 0) or yellow as final or terminal color
b2 = 0
r_change = (r2 - r1) / (colors_per_set - 1) #Formulas for value change of r, g and b;
g_change = (g2 - g1) / (colors_per_set - 1)
b_change = (b2 - b1) / (colors_per_set - 1)
def strand(downsizer): #Procedure for drawing a flake-like figure with diminishing factor "downsizer"
t.fillcolor((r, g, b)) #Start of color-filling procedure for strand
t.begin_fill()
t.forward(downsizer * (2 / 5) * radius) #Start of strand drawing with indicated size "downsizer";
t.circle(downsizer * (-1 / 5) * (2 ** 0.5) * radius, 45)
t.left(90)
t.circle(downsizer * (-1 / 5) * (2 ** 0.5) * radius, 45)
t.forward(downsizer * (1 / 5) * radius)
t.left(135)
t.forward(downsizer * (2 / 5) * radius)
t.home()
t.end_fill() #End of color-filling procedure for strand
for j in range(colors_per_set): #Python_Graphic start of drawing procedure; Loop to draw sets of colored strands
initial_angle = 90 + j * 360 / (colors_per_set * sets_of_colors)
for i in range(sets_of_colors): #Sub-loop to draw a set of colored strands
angle_for_set = i * 360 / sets_of_colors
t.left(initial_angle + angle_for_set)
t.pendown()
strand(downsizer) #Function call to draw a strand with indicated size "downsizer"
t.penup()
t.home()
r += r_change #Change in values of variables r, g, and b for the next strand
g += g_change
b += b_change
downsizer = 0.85 * downsizer #Change in value of size factor for strand; Preferred multiplier is from
t.hideturtle() #range 0.6 to 0.9
screen.exitonclick()
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Simple Python Turtle Graphic and Code: Star Disk» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.