Group Abstract Group Abstract

Message Boards Message Boards

0
|
12.1K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Visual problem when plotting several figures

Posted 10 years ago

Hi

Suppose 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.

enter image description here

Thank you very much!

Best, Alex

POSTED BY: Alex Smilgins
4 Replies
Posted 10 years ago

Thank you very much for your answers!

POSTED BY: Alex Smilgins
POSTED BY: Bianca Eifert

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]
POSTED BY: S M Blinder

I doubt you can set priorities in 3D, but you can make the planes partially transparent with Opacity[]. Otherwise you may use Sphere instead of Point.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard