In[]:=
deploy
Sat 11 Sep 2021 01:49:03
circle=SliceContourPlot3D[+y^2,z==0,{x,-1,1},{y,-1,1},{z,-1,1},Contours->{1},ContourStyle->Dashed,ContourShading->None,BoundaryStyle->None,PlotRange->All];genPlot[theta_]:=plot1=Plot3D[3x^2+y^2,{x,-1,1},{y,-1,1},MeshFunctions->{#3&,Mod[ArcTan[#1,#2],2Pi,theta]&},MeshStyle->{Automatic,Thick},Mesh->{5,{theta,theta+Pi}},Boxed->False,Axes->False,RegionFunction->Function[{x,y,z},x^2+y^2<1],PlotPoints->25];point={Cos[theta],Sin[theta],0};plot2=Graphics3D[{Opacity[.5],EdgeForm[None],Polygon[{-point,point,point+{0,0,10},-point+{0,0,10}}]}];plot3d=Show[plot1,plot2,circle,SphericalRegion->True,ImageSize->600];plot2d=Plot[+3y^2/.{x->Sin[theta]*d,y->Cos[theta]*d},Labeled[3,,{Above,Left}],Labeled[1,,{Above,Left}],{d,-1,1},PlotRange->{0,3.5},Ticks->{{-1,1},{{1,""},{3,""}}},PlotStyle->{Automatic,Dashed,Dashed},AspectRatio1,ImageSize->300,Epilog{Gray,Thin,Line[{{-1,0},{-1,3.5}}],Line[{{1,0},{1,3.5}}],Circle[{1,3+},.05]}];GraphicsRow[{plot3d,plot2d}];exportAnim[fn_,images_,is_]:=Module[{},rasters=Rasterize[Style[#,AntialiasingTrue],ImageSizeis,RasterSize2is]&/@images;SetDirectory[NotebookDirectory[]];SetDirectory["export"];Export[fn,rasters,"AnimationRepetitions"Infinity,"DisplayDurations"->1/60]];step=60;images=Table[genPlot[angle],{angle,0,Pi-Pi/step,Pi/step}];exportAnim["rotation.gif",images,300];
2
x
2
x
λ
max
λ
min
2
Cos[theta]
2
Sin[theta]