Pythondex
Turtle Python Programs

Draw Tesla Logo In Python Turtle

Last updated July 3, 2023 by Jarvis Silva

In this tutorial I will show you how to draw the tesla car logo using python, Tesla is one of the most popular car because of its self driving AI, It is one of my favorite car so I have decided to create a tutorial on drawing its logo using python.

To create this program we will use the turtle module in python, turtle is a GUI library with the help of this library you can draw anything in python. 

Python Code To Draw Tesla Logo


import turtle

tur = turtle.Turtle()

tur.getscreen().bgcolor("red")
tur.pencolor("black")

tur.speed(10)

tur.color("white")
tur.penup()
tur.goto(-160,160)
tur.pendown()

tur.begin_fill()
tur.left(18)
tur.circle(-500,40)
tur.right(90)
tur.forward(17)

tur.right(89.5)
tur.circle(500,39)
tur.right(90)
tur.forward(17)
tur.end_fill()


tur.penup()
tur.goto(-155,133)
tur.pendown()

tur.begin_fill()
tur.right(90.5)
tur.circle(-500,38)
tur.right(70)
tur.circle(-30,80)
tur.left(90)
tur.circle(-20,-70)
tur.right(10)
tur.circle(-300,-15)
tur.right(93)
tur.forward(280)
tur.right(160)
tur.forward(280)
tur.left(80)
tur.circle(300,15)
tur.circle(20,70)
tur.left(80)
tur.circle(30,-80)
tur.end_fill()

tur.penup()
tur.goto(-20,155)
tur.pendown()
tur.pencolor("black")
tur.color("red")
tur.begin_fill()
tur.left(30)
tur.forward(60)
tur.left(130)
tur.forward(65)
tur.end_fill()

turtle.done()

Above is the code for drawing the tesla logo, If you look at the code it is using all turtle functions so let’s how do they work:

  • Import the turtle module and create a turtle object.
  • Set the background color to red and the pen color to black.
  • Set the drawing speed of the turtle.
  • Position the turtle and start filling a shape resembling a heart.
  • Draw partial circles and lines to form the main part of the heart shape.
  • Lift the turtle’s pen and move to a new position to start drawing another part of the shape.
  • Draw additional arcs and circles to complete the shape of the heart.
  • Move the turtle to a new position and draw a small triangular shape.
  • Fill the triangular shape with a red color.
  • Finish the drawing by calling turtle.done().

Above was a short explaination of the code now you have the code, but there is one last thing you need to do as I have said I have used the turtle library for this program so you might need to install it if you get any errors like turtle module not found use below command to install.


pip install turtle

Now to run this program you need to have python installed on your computer, If you don’t have then follow this guide: Install and setup python on your computer or use this online compiler for turtle.

After you run this program it will open a new window and it will start drawing the tesla logo and below is the finished drawing of the logo you will get.

Tesla Logo Drawing In Python

As you can see we successfully drew the tesla logo using python. I hope you were able to run this program successfully. 

Here are some more python drawing tutorials for you:

I hope you found what you were looking for from this tutorial, and if you want more python guides and tutorials like this, do join our Telegram channel for future updates.

Thanks for reading, have a nice day 🙂