I'm trying to plot a system with a variable (or field) $\theta(x,t)\in[-\pi,\pi]$ which is an angle at every position $x$. The positional argument $x$ itself is a periodic coordinate $x\in[-\pi,\pi]$. I'm trying to show some topological properties of this field, and I felt that a natural way to do so would be to plot the curve $\theta$ versus $x$ for $\theta = \theta(x)$ at a fixed time $t$ on the surface of a torus ($S^1\times S^1$). This would clearly represent the periodic nature of $\theta$ and $x$. Is there a neat way to do this on Mathematica?
For example, my idea was to use the blue coordinate (refer image) as the position variable $x$ and the red coordinate at each $x$ to represent $\theta(x)$. In this way both $x$ and $\theta$ are periodic.
Edit: $t$ is time. I just put it there for completeness. I need to plot the variable at different time slices.
t
in first line? How is that suppose to enter into the plot? (2) My take on your comment: You wish to plot a curve on the surface of $S^1 \times S^1$ that represents a function $S^1 \rightarrow S^1$ given by $\theta = f(x)$? $\endgroup$ – Michael E2 Dec 7 '18 at 11:42With[{f = Function[x, x]}, ParametricPlot3D[{(2 + Cos[\[Theta]]) Cos[ x], (2 + Cos[\[Theta]]) Sin[x], Sin[\[Theta]]}, {x, -Pi, Pi}, {\[Theta], -Pi, Pi}, MeshFunctions -> {Function[{x0, y0, z0, x, \[Theta]}, \[Theta] - f[x]], #4 &, #5 &}, Mesh -> {{0}}, MeshStyle -> {Directive[Thick, ColorData[97][1]], Thin, Thin}, BoundaryStyle -> None]]
-- the thick, bluish line represents the graph, the thin lines are the $\theta,x$ axes. Is that what you're after? $\endgroup$ – Michael E2 Dec 7 '18 at 11:43