I'm trying to draw a figure as shown below and letmake it rotate around the vertical axis (z-axis) automatically.
This is how I generate the figure and letmake it rotate:
\[CapitalDelta]\[Phi]Δϕ = \[Pi]π 14.0/13.0;
p1 =
Show[
Table[RegionPlot3D[ Table[
RegionPlot3D[
x^2 + y^2 + (z - j)^2 <
0.5^2 &&
(x - 0.4 Cos[j \[CapitalDelta]\[Phi]]Δϕ]) Cos[
jCos[j \[CapitalDelta]\[Phi]]Δϕ] + (y -
0.4 Sin[j \[CapitalDelta]\[Phi]]Δϕ]) Sin[
Sin[j Δϕ] < 0,
j \[CapitalDelta]\[Phi]] < 0, {x, -0.5, 0.5}, {y, -0.5,
0.5}, {z, -0.5 + j, 0.5 + j},
PlotStyle -> Blue,
Mesh -> None],
{j, 0, 5}],
PlotRange -> All,
BoxRatios -> Automatic];
p2 =
Graphics3D[
Table[Arrow[ Table[
Arrow[{{0.4 Cos[j \[CapitalDelta]\[Phi]]Δϕ],
0.4 Sin[j \[CapitalDelta]\[Phi]]Δϕ],
j}, {Cos[j \[CapitalDelta]\[Phi]]Δϕ],
Sin[j \[CapitalDelta]\[Phi]]Δϕ], j}}],
{j, 0, 5}]];
p =
Show[{p1, p2},
Boxed -> False, Axes -> False,
ViewPoint -> {0, -10, 0}, ViewCenter -> {0, 0, 2.5},
ViewVertical -> {0, 0, 1}];
vc = AbsoluteOptions[p, ViewCenter][[1, 2]];
vp = AbsoluteOptions[p, ViewPoint][[1, 2]];
m = RotationMatrix [5 Degree, {0., 0., 1.}];
newvp = m.(vp - vc);
Export["a.gif",
Table[Show[pTable[
Show[p,
ViewPoint -> MatrixPower[m, j].(vp - vc) + vc,
PlotRange -> All],
{j, 0, 360/5 - 1}]];
This is how the gif file looks like
I don't understand why the gif is kind of oscillating in the horizontal direction, and the arrows seem turn around when a cycle is done and the next cycle starts. What I want is to have the rotating axis (here the z-axis) fixed while the figure is rotating. Which part of my code is wrong?