Clayton, this is a cool animation, I really like the approach.
But the code with the Dynamic
and Manipulate
ran so slow that I couldn't even see an animation.
When I try to make a plot for just a single value of theta, it takes about 10 seconds on my machine. I was able to get this to about half a second by simplifying the plotted function and compiling it. It was still too slow for Manipulate
in my opinion, so I made a list of images before plotting
funcsc = Compile[{{th, _Real}, {y, _Real}},
Evaluate@Table[
With[{x = x, i = i, s = 1/2 + 1/2 Cos[th]},
{x, y,
If[1 < x^2 + y^2 < 9,
i Max[s, Sin[ArcCos[Sqrt[x^2 + y^2] - 2]]], i s]}], {i, -1,
1}, {x, -4.5, 4.5, 1/4}]
];
cols = RGBColor /@ {"#5FC9F3", "#081F37"};
r = 2.7;
imglist = Table[ParametricPlot3D[funcsc[?, y]
, {y, -4, 4},
PlotStyle -> Directive[Thickness[.003], cols[[1]]],
PlotRange -> {{-4.5, 4.5}, {-4.5, 4.5}, {-1.5, 1.5}},
PlotPoints -> 100, Boxed -> False, Axes -> None,
ViewPoint -> 100 {1, 0, r},
ViewAngle -> ?/(4*100*Sqrt[1 + r^2]), ImageSize -> 540,
Background -> cols[[2]]], {?, 0,
2 ?, .1}];~Monitor~?