This is a simple Python program that uses the Turtle Graphics library to draw a leaf-like circular pattern. Each leaf is created using arcs, and the turtle rotates after each one to form a complete shape.
- Python 3.x
turtle(included with Python)
-
The program initializes the Turtle environment:
- Full-screen window
- Black background
- White drawing color
- Moderate pen thickness for smooth lines
-
It defines a single function:
leaf(): Draws a leaf shape by combining two circular arcs connected by a turn.
-
The main loop:
- Calls
leaf()multiple times (9 by default) - Rotates slightly between each iteration to create a radial pattern
- Calls
Run the script in a Python environment that supports Turtle graphics (such as the standard Python IDLE):
python main.pyClick anywhere on the window to close it when the drawing is finished.
-
Change the number of leaves:
for i in range(12): leaf()
-
Adjust the angle between leaves inside the
leaf()function:t.left(60)
-
Modify the color or background:
t.color("green") screen.bgcolor("lightblue")
-
Change leaf curvature by adjusting the circle radius or arc extent:
t.circle(80, 120)
Here are some example patterns generated by the program:


