In[]:=
deploy
Tue 14 Sep 2021 23:51:40
In[]:=
cylinder[t_]:=With{x=Cos[t],y=Sin[t]},Graphics3D@Cylinder{{x,y,0},{x,y,
2
x
+3
2
y
}},1100;​​plot3da=Plot3D[{0,
2
x
+3
2
y
},{x,-1,1},{y,-1,1},RegionFunctionFunction[{x,y,z},x^2+y^2≤1],MeshFunctions{#3&},BoxedFalse,AxesNone,PlotStyleOpacity[0.5],PlotPoints50];​​plot3d[t_]:=Show[plot3da,cylinder[t]]​​blue=ColorData[97,"ColorList"][[1]];​​plot2da=Plot[Callout[
2
Cos[t]
+3
2
Sin[t]
,"
λ
1
",Above],Callout[
2
Cos[t]
+3
2
Sin[t]
,"
λ
2
",Below],Callout[2,"
λ
ave
",Above],{t,0,2Pi},PlotStyle{blue,blue,Dashed},AxesOrigin{0,0}];​​point[t_]:=ListPlot[With[{x=Cos[t],y=Sin[t]},{{t,
2
x
+3
2
y
}}],PlotStylePointSize[Large],FillingAxis,FillingStyleDirective[Orange,Opacity[0.8]]]​​plot2d[t_]:=Show[plot2da,point[t],ImageSize400];​​plotCombined[t_]:=GraphicsRow[{Show[plot3d[t],ImageSize600],Show[plot2d[t],ImageSize500]}];
In[]:=
numFrames=10;​​frames=Table[plotCombined[t],{t,0,2Pi-2Pi/numFrames,2Pi/numFrames}];​​ListAnimate[frames]​​Export["test-rotation.gif",frames,"DisplayDurations"->1/50]
Out[]=
Out[]=
test-rotation.gif

Blend some frames together

In[]:=
genWeights[spread_,subsample_]:=​​Assert[OddQ[spread]];​​Assert[OddQ[subsample]];​​​​(*generatesinplotcenteredatoffset,withgivenwidth.offset-width/2..offset+width/2*)​​makePlot[offset_,width_]:=​​Cos
2π(-offset+x)
width
+12​​;​​​​width=(spread*subsample-1)+2;​​middleFrame=(width-2)2;​​expr=makePlot[middleFrame,width];​​expr/.x->#&/@Range[0,spread*subsample-1]//N​​;​​​​spread=3;subsample=1;​​weights=genWeights[spread,subsample];​​​​(*padindicesforaveraging*)​​idx=Range@Length@frames~Join~Range[Length@weights-1];​​​​framesBlended=Blend[frames[[#]],weights]&/@Partition[idx,spread*subsample,subsample];​​Export["test-rotation2.gif",framesBlended,"DisplayDurations"->1/50]​​
Out[]=
$Aborted
Out[]=
test-rotation2.gif