The following is a MWE extracted from a more complex graphic.
vertex = {8 Sqrt[2/((5 - Sqrt[5]) (10 + 2 Sqrt[5]))], 0, 8/
Sqrt[(10 - 2 Sqrt[5]) (10 + 2 Sqrt[5])]};
example[r_] :=
Show[Graphics3D[{Opacity[0.3, GrayLevel[0.8]], Sphere[{0, 0, 0}, r],
GrayLevel[0.2], Opacity[1],
Style[Sphere[{0, 0, 0}, 3],
ClipPlanes ->
Hyperplane[vertex, Cos[30 Degree]*3*Normalize[vertex]]]},
Boxed -> False], Lighting -> "Neutral",
ViewPoint -> {1.7, -2.7, 1}, ViewVertical -> {0, 0, 1},
ImageSize -> {1000, Automatic}]
Export["ex1.png", example[3]]
Export["ex2.png", example[3.001]]
The second example is a bit better than the first one, but both show artifacts that I'd like to get rid of. (To clarify what I'm talking about: In both cases, the boundary of the spherical cap is clearly some $n$-gon and not a circle. And Example[2.999]
would have the same effect.)
How can I improve this? Is there a way to increase the mesh granularity of the sphere? Or is there a better way to create the spherical cap?