# Visual problem when plotting several figures

Posted 6 years ago
7057 Views
|
4 Replies
|
0 Total Likes
|
 HiSuppose that I want to plot two polygons and some points in the same 3d graph. For example: poly1 = Graphics3D[Polygon[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}]]; poly2 = Graphics3D[Polygon[{{2, 1, 1}, {1, 1, 1}, {1, 1, 2}}]]; Show[poly1, poly2, ListPointPlot3D[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}, PlotStyle -> Directive[Red, PointSize[0.05]]]] Where the two polygons meet, I am asking Mathematica to plot both the plans and the point (1,1,1). How can I set the priority such that the point has a higher priority? The problem is that I want the red points to have higher priority, i.e. to be drawn completely. On the picture you can see that it is not the case. If I have more figures, sometimes when turning the graph, the point can even disappear completely, while I want it to be very clear.Thank you very much!Best, Alex
4 Replies
Sort By:
Posted 6 years ago
Posted 6 years ago
 The opacity solution may work just fine for you, but it can be demanding for older machines or if there's any compatibility issue with the graphics driver (that can happen on some Linux systems). Try the following if you want opaque planes and the points don't have to be flat: Graphics3D[{ Polygon[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}], Polygon[{{2, 1, 1}, {1, 1, 1}, {1, 1, 2}}], Red, Sphere[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}, .05] }] (Also, I can't quantify it off the top of my head, but a Show of a lot of Graphics3D objects tends to be slower than one big Graphics3D, but that won't matter for plots with only a few elements.)
 Try this poly1 = Graphics3D[{Opacity[.5], Polygon[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}]}]; poly2 = Graphics3D[{Opacity[.5], Polygon[{{2, 1, 1}, {1, 1, 1}, {1, 1, 2}}]}]; points = Graphics3D[{Red, Opacity[1], PointSize[0.05], Point[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}]}]; Show[poly1, poly2, points]