Complementary Wave

Isnpired by Gábor Damásdi[br][br]https://szimmetria-airtemmizs.tumblr.com/post/163373117293/sine-wave?is_related_post=1
Script
a = Slider(0, 2 pi , 0.01, 1, 160, false, true, false,false)[br]SetVisibleInView(a, 1, false)[br]#Set slider repeat=Increasing#[br][br]f(t) = 0.92 *cos(t-a)+1[br][br]diff = 0.06[br]Ln = Sequence((k, 0), k, 0, 2 pi, 2pi/40)[br]L0 = Zip(Segment( P, (x(P), f(x(P))-diff )), P, Ln)[br]L1 = Zip(Segment( (x(P), f(x(P))+diff), (x(P), 2)), P, Ln)[br][br]SetVisibleInView(Ln, 1, false)[br]SetVisibleInView(f, 1, false)[br][br]SetColor(L0, "Red")[br]SetColor(L1, "Blue")[br][br]ShowGrid(false)[br]ShowAxes(false)[br]CenterView((pi,1))[br]StartAnimation(a)

Information: Complementary Wave