Lets draw a Spiral Rosettes in Python Turtle Library.
Download Thonny Ide: https://thonny.org
#CODE
import turtle
turtle.penup()
turtle.speed(0)
turtle.bgcolor('black')
#ask the user for the number of sides, default to 4, min 2 , max 6
sides = int (turtle.numinput ('Number of sides','How many sides in your spiral of rossettes?', 4, 2, 6 ) )
colors=['red','yellow','blue','green','purple','orange']
#our outer spiral loop
for m in range(100):
turtle.forward(m*4)
position = turtle.position() #remember this corner of the spiral
heading = turtle.heading() # remember the direction we were heading
#our inner spiral loop draws a rosette
for n in range(sides):
turtle.pendown()
turtle.pencolor(colors[n%sides])
turtle.circle(m/5)
turtle.right(360/sides-2)
turtle.width(m/20)
turtle.penup()
turtle.setx(position[0]) #go back to the big spiral's x location
turtle.sety(position[1]) #go back to the big spiral's y location
turtle.setheading(heading) #point in the big spiral's direction/heading
turtle.left(360/sides+2) #move to the next point on the big spiral, lets try
More Python Turtle Graphics Tutorials: • Python Turtle Tutorials 1 # Draw Square Sp...
Good Luck...
Music of this video;
Gymnopedie No 2 de Kevin MacLeod cuenta con una licencia Creative Commons Atribución 4.0. https://creativecommons.org/licenses/...
Fuente: http://incompetech.com/music/royalty-...
Artista: http://incompetech.com/
On this page of the site you can watch the video online Python Turtle Tutorials 10 # Spiral Rosettes with a duration of hours minute second in good quality, which was uploaded by the user Coder & Maker 01 January 1970, share the link with friends and acquaintances, this video has already been watched 128 times on youtube and it was liked by 0 viewers. Enjoy your viewing!