Translations on the plane
##-- Initial setup --##
A = (1.2, 1.66)
B = (2.6, 0.68)
C = (2.94, 2.6)
O = (0, 0)
d = 6
N = Sequence(d)
##-- Define Names for triangles --##
Nobj = Zip("trian"+Text(n), n, N)
##-- Plot Triangles --##
Execute(Zip(name" = Rotate(Polygon({A, B, C}), 2 pi "+n+" / d, O)", name, Nobj, n, N))
##-- Define Vectors --##
U = (0.82, -3.91)
V = (3.77, -1.27)
u = Vector(O, U)
v = Vector(O, V)
##-- Translate each triangle --##
M = Sequence(-d+1, d-1)
T1 = Zip(Zip( Translate(trian1, m*u + n*v), m, M ), n, M )
T2 = Zip(Zip( Translate(trian2, m*u + n*v), m, M ), n, M )
T3 = Zip(Zip( Translate(trian3, m*u + n*v), m, M ), n, M )
T4 = Zip(Zip( Translate(trian4, m*u + n*v), m, M ), n, M )
T5 = Zip(Zip( Translate(trian5, m*u + n*v), m, M ), n, M )
T6 = Zip(Zip( Translate(trian6, m*u + n*v), m, M ), n, M )
##-- Settings and format --##
SetVisibleInView(O, 1, false)
ShowLabel(U, false)
ShowLabel(V, false)
SetVisibleInView(Nobj, 1, false)
Execute(Sequence("SetDynamicColor(trian"+k+", "+k+"/d, 0.7, 1, 1)", k, 1, d))
Execute(Sequence("SetDynamicColor(T"+k+", "+k+"/d, 0.7, 1, 1)", k, 1, d))
Execute(Sequence("SetVisibleInView(T"+k+", 1, false)", k, 1, d))
Execute(Sequence("SetVisibleInView(T"+k+", 2, true)", k, 1, d))
Inspired by Alejandro Gallardo