# Plotting paths between two points on a torus

I'm trying to draw the $K6$ graph on a torus. I plotted and the torus and the six points, and I know how to parametrize a path in $\mathbb{R}^{3}$ from each point to another. However, I can't figure out how to take these paths and make them stay along the surface of the torus. Because a path between two points is parametrized by one parameter, while the torus is parametrized by two parameters, hence I just can't compose the functions to get this to work. Any help would be appreciated.

• Please edit this question to include the code you have so far. You should not expect people here to code the whole problem from scratch. – m_goldberg Nov 22 '17 at 0:07
• Parameterize your projected line as a linear change in angle around the central axis of the torus ($\theta$) and around the cylindrical arc ($\phi$): $\theta(t) = \theta_0 + t (\theta_f - \theta_0)$ and likewise for $\phi$ for $0 \leq t \leq 1$. – David G. Stork Nov 22 '17 at 0:21

torus = ParametricPlot3D[
{Cos[θ] (1 + .3 Cos[φ]),
Sin[θ] (1 + .3 Cos[φ]),
.3 Sin[φ]},
{θ, 0, 2 π}, {φ, 0, 2 π},
PlotStyle -> Opacity[0.3]];

line = ParametricPlot3D[
{Cos[.2 + t (.8 - .2)] (1 + .3 Cos[.1 + t (2.5 - .1)]),
Sin[.2 + t (.8 - .2)] (1 + .3 Cos[.1 + t (2.5 - .1)]),
.3 Sin[.1 + t (2.5 - .1)]},
{t, 0, 1},
PlotStyle -> Directive[Thick, Red]];

Show[torus, line, Boxed->False, Axes -> None]

Now just insert your six points and draw the lines between each pair by this method.