STARLEAP / PYTHON TURTLE

Build 2026.09.17-001210-0400

On this page

5. Turtle Circles And Arcs: Curves That Repeat

You can already draw regular polygons with variables, loops, and functions. Today you will use the turtle's curve tool to draw circles, arcs, flowers, and spirograph-style designs.

An arc is part of a circle. In turtle, t.circle(radius) draws a full circle. t.circle(radius, extent) draws part of a circle.

Start With A Turtle File

Save a new file named turtle_curves.py.

Start with this template.

CODE
import turtle

screen = turtle.Screen()
screen.setup(600, 800, 0, 0)
t = turtle.Turtle()
t.speed(5)
t.pensize(3)

# Your curve code goes here.

screen.mainloop()

Run the program. A blank turtle window is fine. Close the turtle window before you change the code again.

Step 1 - Draw One Circle

Replace the middle comment with this code.

EDIT VIEW - Gray = already there; dark = add or change
t.speed(5)
t.pensize(3)

t.circle(80)

screen.mainloop()

Run the program.

The number inside t.circle(80) is the radius. A bigger radius makes a bigger circle. The turtle starts on the edge of the circle and curves around until it returns to its starting spot.

Step 2 - Give The Radius A Name

Change the middle code to use a variable.

EDIT VIEW - Gray = already there; dark = add or change
t.pensize(3)

radius = 80
t.circle(radius)

screen.mainloop()

Run the program. Then change only radius and run again.

Try these radius values one at a time.

Step 3 - Draw Part Of A Circle

Add a second value to t.circle(...).

EDIT VIEW - Gray = already there; dark = add or change
t.pensize(3)

radius = 100
extent = 180
t.circle(radius, extent)

screen.mainloop()

Run the program.

extent tells the turtle how many degrees of the circle to draw. 360 is a full circle, 180 is a half circle, and 90 is a quarter circle.

Change only extent and run after each change.

CODE
extent = 45
extent = 90
extent = 270
extent = 360

Step 4 - Repeat An Arc

Use a loop to draw the same arc again and again.

EDIT VIEW - Gray = already there; dark = add or change
radius = 100
extent = 90

for i in range(4):
    t.circle(radius, extent)
    t.left(90)

screen.mainloop()

Run the program.

The loop draws one arc, turns the turtle, and then repeats. The white space before the two turtle lines shows that both lines belong to the loop.

Step 5 - Make One Petal

A petal can be made from two matching arcs.

EDIT VIEW - Gray = already there; dark = add or change
t.pensize(3)

radius = 90
arc_angle = 60

for i in range(2):
    t.circle(radius, arc_angle)
    t.left(180 - arc_angle)

screen.mainloop()

Run the program.

arc_angle controls how wide the petal opens. The turn 180 - arc_angle points the turtle back for the second side of the petal.

Change only arc_angle and run after each change.

CODE
arc_angle = 40
arc_angle = 80
arc_angle = 120

Step 6 - Name The Petal Chunk

Turn the petal code into a function.

EDIT VIEW - Gray = already there; dark = add or change
t.pensize(3)

def draw_petal(radius, arc_angle):
    for i in range(2):
        t.circle(radius, arc_angle)
        t.left(180 - arc_angle)

draw_petal(90, 60)

screen.mainloop()

Run the program.

The argument names tell the reader what each value does. draw_petal(90, 60) means radius 90 and arc angle 60.

Step 7 - Repeat The Petal Into A Flower

Call the petal function inside another loop.

EDIT VIEW - Gray = already there; dark = add or change
def draw_petal(radius, arc_angle):
    ...

petals = 12
turn = 360 / petals

for i in range(petals):
    draw_petal(90, 60)
    t.left(turn)

screen.mainloop()

Run the program.

The loop draws one petal, turns a little, and repeats until the petals go all the way around the center.

Step 8 - Make The Flower Flexible

Wrap the whole flower idea in a function.

EDIT VIEW - Gray = already there; dark = add or change
def draw_petal(radius, arc_angle):
    ...

def draw_flower(petals, radius, arc_angle):
    turn = 360 / petals
    for i in range(petals):
        draw_petal(radius, arc_angle)
        t.left(turn)

draw_flower(12, 90, 60)

screen.mainloop()

Run the program.

Now one function can make many different flowers. The call hands in the number of petals, the radius, and the arc angle.

Change only the call line each time.

CODE
draw_flower(6, 100, 70)
draw_flower(18, 80, 45)
draw_flower(24, 65, 80)

Step 9 - Move Before You Draw

Use t.goto(x, y) to place a flower somewhere on the page before drawing it.

EDIT VIEW - Gray = already there; dark = add or change
def draw_flower(petals, radius, arc_angle):
    ...

t.penup()
t.goto(-180, 120)
t.pendown()
t.color('purple')
draw_flower(12, 70, 60)

screen.mainloop()

Run the program.

Change only the two numbers in t.goto(-180, 120), then run again. The flower starts in a different place.

Final Project - Flower And Spirograph Page

Use this full program to fill the page with different curve designs.

CODE
import turtle

screen = turtle.Screen()
screen.setup(600, 800, 0, 0)
t = turtle.Turtle()
t.speed(5)
t.pensize(3)

def draw_petal(radius, arc_angle):
    for i in range(2):
        t.circle(radius, arc_angle)
        t.left(180 - arc_angle)

def draw_flower(petals, radius, arc_angle):
    turn = 360 / petals
    for i in range(petals):
        draw_petal(radius, arc_angle)
        t.left(turn)

def draw_at(x_position, y_position, ink, petals, radius, arc_angle):
    t.penup()
    t.goto(x_position, y_position)
    t.setheading(0)
    t.pendown()
    t.color(ink)
    draw_flower(petals, radius, arc_angle)

draw_at(-210, 150, 'purple', 8, 80, 60)
draw_at(20, 150, 'teal', 14, 65, 75)
draw_at(-210, -100, 'orange', 18, 55, 45)
draw_at(40, -100, 'blue', 24, 45, 80)

screen.mainloop()

Run the program.

Make the page yours by changing one argument value at a time. Good experiments include petals, radius, arc_angle, ink, and the x_position or y_position.

Teacher Check

Show your curve design page. Then point to:

Say this out loud: "A circle can draw a full curve or part of a curve. A loop can repeat arcs into a design. Function arguments let one drawing chunk make many different designs."