Six-Fold Mandala¶
By the end of this lab you'll be able to:
- Draw one section of a mandala and stamp it six times rotating 60° between each
- Build complex symmetric patterns from a simple repeated unit
- Understand how
360 / 6 = 60°rotation creates six-fold symmetry
Twelve concentric rings of petals, arcs, and diamonds — all generated by drawing one sixth of the design and rotating it six times. Change one detail and all six sections update instantly.
Welcome to the Six-Fold Mandala!
Mandalas are ancient art forms based on radial symmetry. In this lab
you'll code one from scratch using a single repeated function!
Let's code it together!
How It Works¶
mandala_section() draws one sixth of the design from the center outward — a petal, then an arc, then a diamond shape. The outer loop calls it six times, rotating 60° each time.
Sample Code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
What Do You Think Will Happen?
We draw 4 petals per section and 6 sections — how many petals total?
Make your guess — then click Run to find out!
Try It Now¶
4 × 6 = 24 petals — arranged in four concentric rings of six, each ring a different color. Were you right?
How It Works¶
petal(size, color) draws a lens shape by drawing two 60° arcs. The turtle starts and ends at the center each time because goto(0, 0) repositions after each petal. setheading(i * 60) before each section rotation ensures all sections start from the same angle offset.
Explanation Table¶
| Line | What it does |
|---|---|
monty.circle(size, 60) |
Draw a 60° arc — one side of the petal lens |
monty.left(120) |
Turn 120° to draw the return arc |
monty.goto(0, 0) |
Return to center between petals |
setheading(i * 60) |
Rotate 60° before each section |
Learning Check¶
Your Turn — Change to 8-Fold
Change range(6) to range(8) and i * 60 to i * 45.
Eight-fold symmetry appears in Islamic tile work and snowflakes.
Predict how the mandala will change — then run it!
Eight-fold symmetry produces 4 × 8 = 32 petals — the sections are narrower and pack more tightly around the center.
Experiments¶
-
Change petal colors. Replace the color list with
['navy', 'royalblue', 'deepskyblue', 'lightcyan']. You'll know it worked when the mandala turns blue. -
Larger outer ring. Change
[30, 50, 70, 90]to[30, 55, 85, 120]. You'll know it worked when the outermost petals are larger. -
Add a center dot. After the loop, add
monty.penup(); monty.goto(0, -15); monty.dot(30, 'gold'). You'll know it worked when a gold circle fills the center. -
Try 12-fold. Change to
range(12)andi * 30. You'll know it worked when 12 sections appear, making a very dense mandala.
Mandala Complete!
You created a mandala from one function repeated 6 times!
Any change to mandala_section() automatically updates all six sections.
Up next: Mirror Butterfly — bilateral symmetry via coordinate negation.