# I AM IRONMAN

img

# project structure

+-- ironman
|    +-- ironman_helmet.py
|    +-- main.py
|    +-- points.py
1
2
3
4

ironman_helmet.py

def draw_ironman_helmet(turtle,points):
    turtle.penup()
    turtle.goto(points[0])
    turtle.pendown()
    turtle.color("#fab104")  # Light Yellow
    turtle.begin_fill()

    for i in range(1, len(points)):
        x, y = points[i]
        turtle.goto(x, y)

    turtle.end_fill()
1
2
3
4
5
6
7
8
9
10
11
12

points.py

ankur1 = [
        [0, 120],
        ...
        [40, 120],
        [0, 120],
]

ankur2 = [
        [0, -30],
        ...
        [40, -30],
        [0, -30],
]

ankur3 = [
        [0, -220],
        ...
        [60, -220],
        [0, -220],
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

download points.py

main.py

from turtle import Screen, Turtle
from ironman_helmet import draw_ironman_helmet
from points import ankur1, ankur2, ankur3

def main():

        screen = Screen()
        screen.setup(500,600)
        screen.title("I AM IRONMAN")
        screen.bgcolor("#ba161e")

        my_turtle = Turtle()
        my_turtle.hideturtle()

        draw_ironman_helmet(my_turtle, ankur1)
        draw_ironman_helmet(my_turtle, ankur2)
        draw_ironman_helmet(my_turtle, ankur3)

        screen.mainloop()


main()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22