[b]Setup[/b][br][br]ft(b,c)= b^2 + b*c + c^2[br][br]Lkit1 = Zip(Zip( If(Mod(ft(b,c),7)==0, (ft(b,c),b,c)), c,0..b), b,1..12)[br]Lkit2 = RemoveUndefined(Flatten(Lkit1))[br]Lkit3 = Sort(Lkit2,x(Lkit2))[br][br]n = Slider(1,20,1, 1,200,false)[br][br]tbc= Lkit3(n)[br]t = x(tbc)[br]b = y(tbc)[br]c = z(tbc)[br]Kitrick = "Nex"+t+"("+b+","+c+")"[br][br]Sgn = If(Mod(3b + 2c, 7) == 0, 1, -1)[br]v = (2b + c, Sgn*sqrt(3)*c)[br]M1 = { {2, -1} , {0, sqrt(3) } }[br]M2 = { {x(v),-y(v)} , {y(v), x(v)} }[br]M3 = Invert(M2) M1[br]tri1 = ApplyMatrix(M3, Polygon({(1,-1), (3,1), (1,1)}))[br]tri2 = Zip(Rotate(tri1, k*60°), k,0..1)[br][br]M4 = M3 { {2,1} , {-1,3} }[br]Lgrid = Flatten(Zip(Zip(M4*(u,v), u,-4..12), v,-4..12))[br]Ltri2 = Zip(translate(tri2,v), v,Lgrid)[br][br]triang = Polygon({ (0,0), (1,0), (0.5,sqrt(3)/2) })[br]M = ( 3, sqrt(3) ) / 6