Script Setup
#A = (0.5, 0.5, 0.5)
#B = (0.5, 0.5, 0.5)
#C = (1, 1, 1)
#D = (0, 0.33, 0.67)
#A = (0.5, 0.5, 0)
#B = (0.5, 0.5, 0)
#C = (0.1, 0.5, 0)
#D = (0, 0.5, 0)
#A = (0.5, 0, 0.5)
#B = (0.5, 0, 0.5)
#C = (0.5, 0, 0.5)
#D = (0, 0, 0.5)
A = (0, 0.5, 0.5)
B = (0, 0.5, 0.5)
C = (0, 0.5, 0.333)
D = (0, 0.5, 0.667)
functionRed(x) = x(A) + x(B) * cos(2pi(x(C) * x + x(D)))
functionGreen(x) = y(A) + y(B) * cos(2pi(y(C) * x + y(D)))
functionBlue(x) = z(A) + z(B) * cos(2pi(z(C) * x + z(D)))
infCurve = Curve( sqrt(2) cos(t)/((sin(t))^2+1), sqrt(2) cos(t) sin(t)/((sin(t))^2+1) , t, 0, 2pi)
t = Slider(0, 2pi, 0.01, 2, 200)
LPs = Sequence(infCurve(k + t), k, 0, 3, 0.03)
m = Length(LPs)
Lm = 1..m
Execute(Zip("C"+k+" = Circle(Element(LPs, "+k+"), 0.02*ln("+(k+1)+"))", k, Lm))
Execute(Zip("ShowLabel(C"+k+", false)", k, Lm))
Execute( Zip("SetDynamicColor(C"+k+", Min(1, Max(0, functionRed("+k+"/m))), Min(1, Max(0, functionGreen("+k+"/m))), Min(1, Max(0, functionBlue("+k+"/m))), 1)", k, Lm) )