I'm trying to make a Black background 3D plot, but the Plot3D seems to introduce planes that cut the graphics, and cast shadows, and I can't figure out the option to make them go away. Here's an example:
ClearAll[e1, e2, e3]
{e1, e2, e3} = IdentityMatrix[3];
ClearAll[rcap, f]
rcap[theta_, phi_] :=
e1 Sin[theta] Cos[phi] + e2 Sin[theta] Sin[phi] + e3 Cos[theta]
f[vp_] := Show[{
ParametricPlot3D[ rcap[Pi/2, p], {p, 0, Pi/2},
PlotRange -> 1.3 {{1, 1}, {-1, 1}, {-1, 1}},
Boxed -> False,
Ticks -> None,
PlotStyle -> {White},
PlotTheme -> "Marketing",
Background -> Black,
FaceGrids -> None
],
ParametricPlot3D[ rcap[p, 0], {p, 0, Pi/2},
PlotStyle -> {White}],
ParametricPlot3D[ rcap[p, Pi/2], {p, 0, Pi/2},
PlotStyle -> {White}],
Graphics3D[{
Opacity[0.7],
Gray,
Sphere[]
}, Boxed -> False]
},
ViewPoint -> vp,
ImageSize -> 0.6 {1920, 1080 }
];
f[{20, 11, 14}]
Observe that when the Graphics3D object gets cut by these planes, so only part of the sphere is visible.
EDIT: In the comments, PloTheme -> "Marketing" was identified with the planes that were casting shadows, but if I remove that option there is still clipping without it:
I think that even without "Marketing" there are still planes -- they just show up more clearly in the "Marketing" theme. If you look very closely, there are planes outlined by the thinnest white lines still visible in the output image.
Here's another view from viewpoint {-13, 40, 8} that makes the clipping more evident:
Is there a way to remove that clipping? One option might be to offset all my graphics by a constant amount to avoid these (now barely visible) planes, but that will get confusing once I start adding additional elements into the mix.
PlotTheme -> "Marketing"
(seeDisplayFunction /. Charting`ResolvePlotTheme["Marketing", ParametricPlot3D]
). So you can addDisplayFunction -> Show
beforePlotTheme -> "Marketing"
or removePlotTheme -> "Marketing"
$\endgroup$e1
,e2
ande3
are not defined. $\endgroup$