%! TEX program = lualatex % \input{.maindir/tex/header/preamble-section}% % inputs the preamble only if necessary \docStart% \begin{tikzpicture}[scale=\torusscale] \tikzinput{lengths} \tikzinput{torus-template} \node at (0.8, 0.3) {$\hat Q$}; \foreach \x in {0,...,\nrOfPts} \foreach \y in {0,...,\nrOfPts} { \coordinate (point) at (1/\nrOfPts * \x, 1/\nrOfPts * \y); \path (point)+({-360/\nrOfPts*(\x+\y)/2-90}:\halflinelength) coordinate (start); \path (point)+({-180-360/\nrOfPts*(\x+\y)/2-90}:\halflinelength) coordinate (end); \draw (start) -- (end); } % overwrite with red \foreach \xy in {0,...,\nrOfPts} { \coordinate (point) at (1/\nrOfPts * \xy, 1/\nrOfPts * \xy); \path (point)+(-360/\nrOfPts*\xy-90:\halflinelength) coordinate (start); \path (point)+(-180-360/\nrOfPts*\xy-90:\halflinelength) coordinate (end); \draw[\boundaryvaluecolor, line width=\thickness] (start) -- (end); } \tikzinput{torus-diagonal-gamma} \tikzinput{torus-corner-coordinates} \end{tikzpicture}% \docEnd%