Friday, October 28, 2022

Python Turtle Graphic Design #7

 Python Turtle Graphic Design #7

Youtube




Source code:

import turtle as t
import colorsys as cs

t.setup(640,640)
t.bgcolor('black')
t.tracer(10)
t.pensize(3)
N = 5
S = 2
A = S*360/N
for i in range(360):
    t.color(cs.hls_to_rgb((i%N)/N,0.5,1))
    t.fd(i)
    t.lt(A)

t.done()

No comments:

Post a Comment

Circle Animation with ImGui

 Circle Animation with ImGui for C++ Youtube: Source code: void CircFunc () {     static int nc = 360 ;     double radius = 300 ;     ...