For people who don't want to download software just to get the needed points for the knot:
lattice31 = AnglePath3D[{19/24, 4/3, 11/8},
{{0, Pi/2}, {0, 0}, {-Pi/2, 0}, {0, Pi/2}, {0, 0}, {0, -Pi/2},
{-Pi/2, 0}, {Pi/2, 0}, {0, -Pi/2}, {0, 0}, {0, -Pi/2}, {0, 0},
{0, -Pi/2}, {0, Pi/2}, {Pi/2, 0}, {0, 0}, {Pi/2, 0}, {0, 0},
{Pi/2, 0}, {0, 0}, {0, 0}, {0, Pi/2}, {Pi/2, 0}}];
As for the main code itself: the standard advice of replacing M.# & /@ pts with pts.Transpose[M] and RotationMatrix[-θ, axis].# & /@ {p, q} with {p, q}.RotationMatrix[θ, axis] applies. ;)