plot of phase on cylinder I have a data including the function theta as a function of x ranging from 0 to pi and the function theta ranges from -pi to pi or from 0 to 2pi:

I would like to plot this function something like winding number as the figure attached. How can I plot this type of function using Mathematica?

Regards.

• You can include any code you have written so far. – Sektor Mar 16 '16 at 9:43
• Possible duplicate of Phase portrait on a cylinder – Kuba Mar 16 '16 at 9:44
• @Kuba I'm not sure. This one isn't asking for an arbitrarily complicated graph projected onto a cylinder, but simply a polar plot extended along the third dimensions which allows for somewhat simpler solutions. – Martin Ender Mar 16 '16 at 9:51
• @MartinBüttner Right, vote retracted. – Kuba Mar 16 '16 at 9:54
• closely related: Spherical parametric plot – Kuba Mar 16 '16 at 10:16

You can write a very simple elongated polar plot using ParametricPlot3D and cylindrical coordinates:

f[x_] := x^2
Show[
Graphics3D[{Opacity[0.8], Glow@White, Cylinder[{{0, 0, 0}, {Pi, 0, 0}}, 1]},
Axes -> True, Boxed -> False],
ParametricPlot3D[{x, -Cos[t], -Sin[t]} /. t -> f[x], {x, 0, Pi}]
] I suppose the presentation could be improved a bit by also rendering the top and bottom "edge" of the cylinder and using an orthogonal instead of perspective projection, but this gets you your graph on the cylinder.

You can also avoid the manual conversion from cylindrical to Cartesian coordinates by using

Evaluate @ CoordinateTransform["Cylindrical" -> "Cartesian", {1, f[x], x}]

inside the ParametricPlot3D, which probably makes for clearer code. But note that in this case the roles of the x and z axes are swapped, so you'll want to change the orientation of the Cylinder as well:

Cylinder[{{0, 0, 0}, {0, 0, Pi}}, 1]
• I have another question. I want to replace the weak-lightening solid line with the dashed lines when lines on the cylinder enter into the backside of cylinder. How can I achieve it? – Lee Apr 12 '16 at 20:07
• @Lee Like this? Otherwise please ask a new question. – Martin Ender Apr 12 '16 at 20:10
• Thanks! Although it looks much complicated, I will try it! – Lee Apr 12 '16 at 20:17