In[]:=
deploy
Wed 15 Sep 2021 21:08:34
In[]:=
$Version
Out[]=
12.3.1 for Mac OS X x86 (64-bit) (July 7, 2021)
Create graphic
Create graphic
In[]:=
circle=SliceContourPlot3D[+y^2,z==0,{x,-1,1},{y,-1,1},{z,-1,1},Contours->{1},ContourStyle->Dashed,BoundaryStyle->None,ContourShading->None,PlotRange->All];disk=BoundaryDiscretizeRegion[Disk[{0,0},1],AccuracyGoal->5];genPlot[theta_]:=plot1=Plot3D[3x^2+y^2,{x,y}∈disk,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[0.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}];enableMesa[img_]:=Style[img,RenderingOptionsRenderingOptions{"3DRenderingEngine"->"Mesa"}];magnify[fn_]:=Module[{im},im=Image[Import@fn,Magnification5];Print[ImageDimensions[im]];im]
2
x
2
x
λ
max
λ
min
2
Cos[theta]
2
Sin[theta]
Export
Export
Default view
In[]:=
img=genPlot[Pi/2]
Out[]=
Default export
In[]:=
is=180;Export["test.gif",img,ImageSize->is];magnify@"test.gif"
{180,119}
Out[]=
Export after rasterize,
1. antialiasing quality drops (top of shape looks jaggy),
2. text rendering quality drops, letters in “min” are now merged
1. antialiasing quality drops (top of shape looks jaggy),
2. text rendering quality drops, letters in “min” are now merged
In[]:=
Export["test2.gif",Rasterize[img,ImageSize->is,ImageResolution72]];magnify@"test2.gif"
{180,119}
Out[]=
Apply {“3DRenderingEngine”->”Mesa”}, antialiasing improves (compare leftmost dark pixels) but text is tiny
In[]:=
Export["test3.gif",Rasterize[enableMesa@img,ImageSize->is,ImageResolution144]];magnify@"test3.gif"
{912,600}
Test with animation
Test with animation