Just for fun:
c[p_, m_, n_, v_] :=
Join @@ CoordinateBoundingBoxArray[{p, p + {m, n} v}, v]
tile[m_, n_] :=
With[{pts =
CirclePoints[{##}, 1, 6] & @@@
Join @@ (c[#, m, n, {2, 2 Sqrt[3]}] & /@ {{0, 0}, {1, Sqrt[3]}})},
Graphics[{EdgeForm[Black], FaceForm[White], Polygon /@ pts,
PointSize[0.01], Point /@ pts}, ImageSize -> 400]
]
So tile[20,5]
Now to make torus:
tor[u_, v_, m_, n_] := {(m + n Cos[v]) Cos[u], (m + n Cos[v]) Sin[u],
n Sin[v]}
f[x_, m_, n_] := Rescale[x, {m, n}, {0, 2 Pi}]
torp[m_, n_, a_, b_] :=
With[{pts =
CirclePoints[{##}, 1, 6] & @@@
Join @@ (c[#, m, n, {2, 2 Sqrt[3]}] & /@ {{0, 0}, {1, Sqrt[3]}})},
Map[tor[f[#[[1]], -1, 2 m + 2],
f[#[[2]], -Sqrt[3]/2, (4 n + 3) Sqrt[3]/2], a, b] &, pts, {2}]]
gv[m_, n_] :=
Graphics3D[{EdgeForm[{Red, Thick}], FaceForm[None],
Polygon /@ torp[m, n, (2 m + 3)/(2 Pi), (4 n + 3) Pi/(4 Pi)],
Yellow, PointSize[0.02],
Point /@ torp[m, n, (2 m + 3)/(2 Pi), (4 n + 3) Pi/(4 Pi)]},
Background -> Black, Boxed -> False, ImageSize -> 400]
Visualizing:
Manipulate[
Row[{tile[p, q], gv[p, q]}], {p, Range[10, 40, 10]}, {q,
Range[3, 11, 2]}]
Apologies for coloring.
Graphics3D
? $\endgroup$