# How to wrap a plot around a circle?

Consider the code

a = Table[BesselJ[i, x], {i, 0, 3}]
Plot[a, {x, 0, 20}, Axes -> False]


producing I'd like to transform the plot into a circle. In other words, I'd like to wrap the plot around a circle.

I found PolarPlot[{1, 1 + 1/10 Sin[10 t]}, {t, 0, 2 Pi}] producing which looks like a sin curve wrapped around the circle.

I know that the result would not be smooth closed, but no problem.

• c[x_] := Table[BesselJ[i, x], {i, 0, 3}]; PolarPlot[ 3 + # & /@ c[10 t], {t, 0, 2 Pi}] Oct 30, 2014 at 23:27
• @belisarius, perfect! Since I'll use 4 colours to each graph, how to pass the colours to PolarPlot? I tried PlotStyle but no success. Oct 30, 2014 at 23:30
• Why closing vote? Oct 31, 2014 at 14:15

Update

ticks[x1_, x2_] := {#/10 + π/2, #} & /@
FindDivisions[{10 (x1 - π), 10 (x2 - π)}, 20]

funcs = Table[3 + BesselJ[i, 10 (x -π/2)], {i, 0, 3}];
PolarPlot[funcs // Evaluate, {x, -π/2, 3π/2},
PolarAxes -> Automatic,
PolarTicks -> {ticks[0, 2 π][[2 ;; -2]], Automatic}
] (*thanks @kguler 's and @rm-rf 's advice*) Manipulate version

Manipulate[
funcs = Table[a BesselJ[i, 10 (x -π/2)] + b, {i, 0, n}];
PolarPlot[funcs // Evaluate, {x, -π/2, 3π/2},
Axes -> False] , {{n, 4}, 1, 10}, {{a, 1}, 0, 3}, {{b, 3}, 1, 5},
ControlType -> {Automatic, VerticalSlider, VerticalSlider},
ControlPlacement -> { Top, Left, Left}] Original

funcs = Table[3 + BesselJ[i, 10 x], {i, 0, 3}]
PolarPlot[Evaluate@funcs, {x, 0, 2 π}] (* thanks @kguler's advice *) • FOr v9 you need to use PolarPlot[Evaluate@funcs, {x, 0, 2 \[Pi]}] to get separate colors. (+1)
– kglr
Oct 30, 2014 at 23:40
• Nice! I'm trying to plot my graphs on a symmetric range around zero (for example, {x,-10,10}) and then I'd like the middle part pointing to north, that is, f(0) onto the vertical axis. Oct 30, 2014 at 23:46
• @Sigur Try this: PolarPlot[funcs /. x -> y - π/2 // Evaluate, {y, 3π/2, -π/2}]
– rm -rf
Oct 30, 2014 at 23:53
• @rm-rf, thanks. It works. The constant circle was confusing me :) Oct 30, 2014 at 23:57
• Well, if we change a little bit the domain we can do it symmetric from the north to the south. Oct 31, 2014 at 0:44
Composition[
{#, Scale[#, {-1, 1}, {0, 0}]} &,
Rotate[#, Pi/2, {0, 0}] &,
First
] /@ Table[
With[{root = FindRoot[D[BesselJ[i, x], x], {x, 100}][[1, 2]]},

PolarPlot[{1 + BesselJ[i, t root/Pi]}, {t, 0, Pi},
]
, {i, 0, 15}] //
Graphics[#, ImageSize -> 500, Background -> Orange] & • @JunhoLee I find yours better bacause it is shorter :) Thanks, well, one could probably argue about colors :P p.s. I like the gradient in background which isn't there :)
– Kuba
Oct 31, 2014 at 0:39
• @Kuba, amazing. Very beautiful. Since I'm doing a logo, unfortunately I can not use yours. But thanks for some idea. Oct 31, 2014 at 0:41
• Now I know how they designed Amidala's hair.
– Öskå
Oct 31, 2014 at 1:10
• @Öskå It's not easy to be hairdresser there days :P
– Kuba
Oct 31, 2014 at 1:13
• @Kuba Not to mention how hat it was during Bessel's time-frame en.wikipedia.org/wiki/Friedrich_Bessel#mediaviewer/… Oct 31, 2014 at 3:21