This project uses Python’s turtle module to create geometric drawings, colorful patterns, random walks, and spirographs.
It’s an excellent way to practice logic, functions, loops, and graphical manipulation in Python.
The script includes several functions that draw different types of shapes:
- Generates random colors using
colormode(255) - Each drawing can have a different color
- Draws a square with 4 movements and 90° turns
- A line made of alternating drawn and blank segments
Automatically draws:
- Triangle
- Square
- Pentagon
- Hexagon
- Heptagon
- Octagon
- Nonagon
- Decagon
Each shape uses a random color.
- Random movements in 4 directions (N, S, E, W)
- Random colors
- Adjustable thickness
- Fast drawing speed
- Draws rotated circles with a defined gap
- Random colors
- Hypnotic visual effect
project/
│
├── main.py
└── README.md
Contains:
- Initial turtle configuration
- Drawing functions
- Selection of which figure to draw (in this case, the spirograph)