here2share

# t_chromatic_weave.py

Feb 3rd, 2026
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. # t_chromatic_weave.py
  2.  
  3. from turtle import *
  4. import math
  5. import colorsys
  6.  
  7. bgcolor("black")
  8. setup(700, 700)
  9. tracer(7)
  10. hideturtle()
  11. width(1)
  12. points = []
  13.  
  14. for i in range(900):
  15.     angle = 2.01 * math.pi * i / 900
  16.     x = 300 * math.cos(angle)
  17.     y = 300 * math.sin(angle)
  18.     points.append((x, y))
  19.  
  20. for i in range(900):
  21.     start_point = points[i]
  22.     end_point = points[(i * 99) % 900]
  23.     hue = i / 900
  24.     rgb = colorsys.hsv_to_rgb(hue, 1.0, 1.0)
  25.     pencolor(rgb)
  26.     penup()
  27.     goto(start_point)
  28.     pendown()
  29.     goto(end_point)
  30.  
  31. update()
  32. done()
Advertisement
Add Comment
Please, Sign In to add comment