Spikes and Curves


This is a Spiky curved pattern coded with small red and black triangles. You can also change the values and coordinates of some codes, so that you can get various designs similar to this.
for exmaple: (change the shape as - turtle / change the color)
Try your design now!
 

import turtle

if __name__ == '__main__':

    turtle.setup(width=720, height=720)

    raj = turtle.Turtle(shape='arrow')
    john = turtle.Turtle(shape='arrow')
    raj.color('red')
    john.color('black')

    raj.penup()
    john.penup()
    raj.goto(-180, 200)
    john.goto(-150, 200)
    for i in range(30, -30, -1):

        raj.stamp()
        john.stamp()
        raj.right(i)
        john.right(i)
        raj.forward(20)
        john.forward(20)

    turtle.exitonclick()

Comments