Wednesday, October 26, 2022

Python Turtle Graphic Design #5

 Python Turtle Graphic Design #5

Youtube


Source code:

import turtle as t
import colorsys as cs
t.setup(640,640)
t.bgcolor('black')
t.tracer(100)
t.hideturtle()
for i in range(600,0,-1):
    t.color(cs.hls_to_rgb((600-i)/1200,0.5-(600-i)/2400,i/600))
    t.fd(i/2)
    t.lt(120)
    t.begin_fill()
    for j in range(6):
        t.fd(i/2)
        t.lt(60)
    t.end_fill()
    t.lt(60)
    t.fd(i/2)
    t.rt(179)
t.done()

No comments:

Post a Comment

Python Turtle Graphics Drawing - Gigabyte

 Python Turtle Graphics Drawing - Gigabyte Youtube Source code: from turtle import * setup ( 600 , 600 ) color ( '#2D68AE' ) up (...