Geometry & colour rule
N identical threads share one torus, evenly phased around the tube by 2π/N. Thread k is
C_k(u) = ((R + a cos w_k) cos u, (R + a cos w_k) sin u, a sin w_k)
w_k = ωu + 2πk/N
Each thread is drawn as a glowing polyline, split into short strokes and painted back to front by depth. There are no surfaces and no shading — only colour, glow and overlap.
The travel trick. Thread k wears palette entry (k + s) mod N; one step sets s ← s + 1. Since w_k(u + 2π/(Nω)) = w_k(u) + 2π/N = w_{k+1}(u), thread k+1 at u sits exactly where thread k sits a little further along the coil. Stepping the colour index therefore slides every colour band one thread forward along the braid, even though no point of geometry moves.