# 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
{"ft_lang_label":"__label__en","ft_lang_prob":0.7769046,"math_prob":0.8254272,"size":919,"snap":"2020-10-2020-16","text_gpt3_token_len":257,"char_repetition_ratio":0.112568304,"word_repetition_ratio":0.0,"special_character_ratio":0.2937976,"punctuation_ratio":0.1861702,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9677259,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,8,null,8,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-03-28T22:03:45Z\",\"WARC-Record-ID\":\"<urn:uuid:d9dee9a4-7936-4317-8e9d-028c91c6aec9>\",\"Content-Length\":\"148476\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:30a4a92c-5597-4c73-a75d-774a4362ee1b>\",\"WARC-Concurrent-To\":\"<urn:uuid:f23f897a-a667-4a50-a7b0-9ff60a74896d>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://mathematica.stackexchange.com/questions/110157/plot-of-phase-on-cylinder\",\"WARC-Payload-Digest\":\"sha1:JOYBQD7ZZLR2XTZF7P5VCER33GQ5O7H4\",\"WARC-Block-Digest\":\"sha1:NMIGIFZM7AUSSTNKDUMLV46SOYKVXJJ3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585370493120.15_warc_CC-MAIN-20200328194743-20200328224743-00473.warc.gz\"}"}