Edit
You can draw a Sin
like curve in the parametric domain,see f[t,u]
as below.
f[t_, u_] := 2 u - 1 - Sin[15 t];
ContourPlot[f[t, u] == 0, {t, 0, 2 π}, {u, 0, 2 π},
PlotPoints -> 80, FrameLabel -> {t, u}]
and then use the MeshFunctions
to lift it to the surface.
ParametricPlot3D[{Cos[t] (3 + Cos[u]), Sin[t] (3 + Cos[u]),
Sin[u]}, {t, 0, 2 Pi}, {u, 0, 2 Pi}, Boxed -> False, Axes -> False,
MeshStyle -> Directive[Thick, Cyan],
MeshFunctions -> Function[{x, y, z, t, u}, f[t, u]], Mesh -> {{0}},
PlotPoints -> 80]
Original
Like this?
f[x_, y_, k_] := 4 Cos[Sqrt[x^2 + y^2] - k]*Exp[-Sqrt[x^2 + y^2]/6];
Manipulate[
ParametricPlot3D[{Cos[t] (3 + Cos[u]), Sin[t] (3 + Cos[u]),
Sin[u]}, {t, 0, 2 Pi}, {u, 0, 2 Pi}, Boxed -> False, Axes -> False,
MeshStyle -> Directive[Thick, Cyan],
MeshFunctions -> Function[{x, y, u, v}, f[u, v, k]], Mesh -> 40,
PerformanceGoal -> "Quality"], {k, 0, 8/π, 1/(50 π)}]