When you combine 2D plots using Show
overlapping data will be shown in the order that the plots/objects are provided to Show
(later argument appears further in the foreground). When making 3D plots the same does not happen instead the closest object is always shown on the foreground. Is there a way to instead always bring one plot/object to the foreground from any viewpoint?
Minimal example:
SeedRandom[1234];
pts1 = RandomPoint[Cuboid[{0, 0, 0}, {1, 1, 1}], 100];
pts2 = RandomPoint[Cuboid[{0.5, 0.5, 0.5}, {0.6, 0.6, 0.6}], 100];
pts = Union[
pts1, pts2
];
Show[
ListPointPlot3D[pts, PlotRange -> All, PlotStyle -> Opacity[0.5]],
HighlightMesh[
DelaunayMesh[pts2[[-10 ;;]]], {Style[1, Red], Style[2, Red]}]
]
I would like the DelaunayMesh to be clearly visible as if it was in the foreground. I understand that I can play with the Opacity of the points but the point is to find a solution where the DelauneyMesh is simply always in the foreground. Fine tuning the opacity of every object to make the Mesh visible while the points themselves are still possible is not a solution. So I would like a solution where the Opacity of the points is actually 1. I just put it at 0.5 to show at least somewhat clearly the shape of the DelaunayMesh. Instead I would like to view the DelauneyMesh as if there was nothing else in front of it at all. (This is a simplified example of course and there are many objects involved in the real case.)