Ever wondered what happens when you code geometric shapes that keep growing and spinning? You get mesmerizing spirals that are both mathematically elegant and visually captivating.
This repo explores polygonal spirals using Pythonβs built-in turtle graphics for interactive, educational, and artistic fun.
Great for beginners, educators, or anyone curious about creating generative art with code.
Each subfolder runs a classic or creative spiral:
#229302#9C026Bcyan#9C026Bgit clone https://github.com/willow788/let-us-play-polygonal-spirals.git
cd let-us-play-polygonal-spirals
cd "Python Code Files/Triangle Code"
# or Pentagon Code, or Hexagon Code, or Circle-like Code
python main.py
Requires only Python 3 (no extra libraries needed; turtle is included in the standard library).
360 / number_of_sides.sides = 6 # hexagon, for example
angle = 360 / sides
length = 2
for i in range(iterations):
turtle.forward(length)
turtle.right(angle)
length += 1
let-us-play-polygonal-spirals/
βββ Python Code Files/
β βββ Triangle Code/
β β βββ main.py
β βββ Pentagon Code/
β β βββ main.py
β βββ Hexagon Code/
β β βββ main.py
β βββ Circle-like Code/
β βββ main.py
βββ Demonstration/
βββ README.md
βββ LICENSE
βββ .gitignore
MIT License β see LICENSE.
You are free to use, modify, and share.
Made with β€οΈ by willow788
If these spirals delight you (or your inner child), give the repo a star!