Libraries:
View the Project on GitHub SindujaSivan/TurtleGraphicsFloral
Project Report: Rainbow Flower Drawing using Turtle Graphics
Objective: The objective of this project is to create an animated drawing of a flower with colorful petals using the Turtle graphics library in Python. The flower should have multiple petals, and each petal’s color should vary in a rainbow-like pattern. The animation is meant to showcase the beauty of the flower with changing colors.
Libraries Used:
Execution:
turtle.setup(800, 800)
turtle.speed(0)
turtle.tracer(10)
turtle.width(2)
turtle.bgcolor("black")
draw_petal1 function is defined to draw a single petal of the flower. It uses the circle method to draw an arc and moves the turtle to create a petal shape. The main loop then iterates through 60 steps, changing the color of the petal and drawing two petals at each step, creating the appearance of a flower with 6 petals.for i in range(60):
flower.color(cs.hsv_to_rgb(i/60, i/60, 1))
draw_petal1(radius)
flower.left(6)
draw_petal1(radius)
tracer function updates the screen at each step, creating the animation effect. Finally, the turtle is hidden, and the turtle.done() function is called to finish the drawing.turtle.hideturtle()
turtle.done()
turtle.bye()
Results: The project successfully achieves its objective by creating an animated drawing of a flower with colorful petals. The colors transition through the rainbow spectrum, giving the flower a vibrant and visually appealing appearance.

Conclusion: The project demonstrates the creative potential of Python’s Turtle graphics library and how it can be used to create visually appealing animations. The combination of simple geometric shapes and color variations results in an aesthetically pleasing and interactive artwork. The project can be extended by adding more complex patterns, shapes, or interactivity for further exploration and artistic expression.