Draw Ellipse Using Turtle in Python
Prerequisite: Turtle Programming Basics
Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle (pen). To move turtle, there are some functions i.e forward(), backward(), etc.
Approach:
The following steps are used :
- Import turtle
- Divide the ellipse into four arcs
- Define a method to form these arc in pair
- Call the function.
Below is the implementation :
Python3
# import packageimport turtle# method to draw ellipsedef draw(rad): # rad --> radius of arc for i in range(2): # two arcs turtle.circle(rad,90) turtle.circle(rad//2,90)# Main section# tilt the shape to negative 45turtle.seth(-45)# calling draw methoddraw(100) |
Output :

Draw design using ellipse Shape
The following steps are used :
- Import turtle
- Set Screen
- Divide the ellipse into four arcs
- Define a method to form these arc in pair
- Call the function multiple times for different colors.
Below is the implementation :
Python3
# import package and making objectimport turtlescreen = turtle.Screen()# method to draw ellipsedef draw(rad): # rad --> radius for arc for i in range(2): turtle.circle(rad,90) turtle.circle(rad//2,90)# Main Section# Set screen sizescreen.setup(500,500)# Set screen colorscreen.bgcolor('black')# Colorscol=['violet','blue','green','yellow', 'orange','red']# some integersval=10ind=0# turtle speedturtle.speed(100)# loop for multiple ellipsefor i in range(36): # oriented the ellipse at angle = -val turtle.seth(-val) # color of ellipse turtle.color(col[ind]) # to access different color if ind==5: ind=0 else: ind+=1 # calling method draw(80) # orientation change val+=10# for hiding the turtleturtle.hideturtle() |
Output :





