K = Slider(1, 10, 1, 1, 160, false, true, false, false)[br]k = Slider(1, 10, 0.01, 1, 160, false, true, false, false)[br]T = Slider(0, 1, 0.01, 4, 160, false, true, false, false)[br]d = Slider(0, 10, 0.01, 1, 160, false, true, false, false)[br][br]L = Join({0}, Sequence(k, k, 1, 6*K-1) )[br]size = Length(L)[br][br]#Define transition [br]f(x) = x^k/(x^k + (1-x)^k)[br]#The next function is just to change motion[br]g(x) = x[br]#g(x) = 1/2(sin(pi/2 cos(x))+1)[br][br]#Define centres functions[br]Fx(x, y, z) = x * sin( pi/3 *( y + (-1)^(floor(y/6)) * f(g(z)) ) ) / ( 3^(-g(z) + floor(y/6)) )[br]Fy(x, y, z) = x * cos( pi/3 *( y + (-1)^(floor(y/6)) * f(g(z)) ) ) / ( 3^(-g(z) + floor(y/6)) )[br]#as vectors[br]Vec = Sequence(Vector( (0, 0), (Fx(d, Element(L, k), T), Fy(d, Element(L, k), T)) ), k, 1, Length(L))[br]#as points[br]C = Sequence((x(Element(Vec, k)), y(Element(Vec, k))), k, 1, Length(L))[br][br]#Define rotation function[br]G(x, y) = f(g(x)) * pi / 3 * (-1)^(floor(y/6))[br][br]#Define dilatation function[br]H(x, y) = 1/3^(-g(x) + floor(y/6))[br][br]#Make lists: Sequence(, k, 1, Length(L))[br][br]#Step 1 translation[br]K_0 = Sequence( Translate( pic1, Element(Vec, k) ), k, 1, Length(L) )[br][br]#Step 2 dilatation[br]K_1 = Sequence( Dilate( Element(K_0, k), H(T, Element(L, k)), Element(C, k) ), k, 1, Length(L))[br][br]#Step 3 rotation[br]K_2 = Sequence( Rotate( Element(K_1, k), G(T, Element(L, k)), Element(C, k) ), k, 1, Length(L))[br]SetVisibleInView(K_2, 1, false)[br]SetVisibleInView(K_2, 2, true)
Inspired by [url=https://twitter.com/GHSMaths]Martin Holtham[/url][br][br]https://www.desmos.com/calculator/kp7xu23oqr
Also check this other version using the Zip() command[br][br]https://www.geogebra.org/m/h4qhfrtn[br][br]by [url=https://www.geogebra.org/u/thijs]Thijs[/url]