Make a beautiful Turtle graphics
3D Triangular design using python turtle
Source Code:
import turtlefrom turtle importwn = Screen()wn.setup(width=1200, height=680)wn.bgcolor('black')r,g,b=255,0,0for i in range (255*2):colormode (255)if i<255//3:g+=3elif i<255*2//3:r-=3elif i<255:b+=3elif i<255*4//3:g-=3else:b-=3speed (0)fd(i)rt (90)fd(i)rt (60)fd(i)lt(90)bk(i)rt (90)fd(i)rt (90)pencolor (r,g, b)wn.mainloop()
0 Comments
Post a Comment