Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'd like to plot in 3D a long list of polygons created with TetGenConvexHull, but only in regions specified by a function. Is that possible? As I have it my RegionFunction only applies to some points, and not to my Graphics3D Polygon data:

Show[{ListPointPlot3D[{{-0.57735, 0., 0.8165}, {-0.866025, -0.5, 0.}}, 
   RegionFunction -> 
    Function[{x, y, z},z <= .6], 
   BaseStyle -> {Black, PointSize[Large]}, AxesLabel -> {x,y,z},Boxed -> False,
   AxesOrigin -> {0,0,0}, BoxRatios -> {1, 1, 1},
   PlotRange -> {{-1, .1}, {-.6, .6}, {-.1, 1}}],
  Graphics3D[{Opacity[0.34], EdgeForm[], Red, 
            Polygon[{{-0.57735, 0., 0.8165}, {0., 0., 0.}, {-0.866025, -0.5, 0.}}]}], 
  Graphics3D[{Opacity[0.34], EdgeForm[], Blue, 
            Polygon[{{-0.57735, 0., 0.8165}, {-0.866025, 0.5, 0.}, {0., 0., 0.}}]}]}]

Output from above code

Notice that RegionFunction clips the first datum in ListPointPlot3D ({-0.57735, 0., 0.8165}), but not the Graphics3D Polygon as I would like. I'd like the Polygon surfaces to be clipped/truncated wherever they intersect the RegionFunction (not for the surface to be omitted entirely, given a single intersection location/coordinate).

Perhaps there is a way to transform Polygon data into ListSurfacePlot3D data, which can be utilized with RegionFunction...

Note: I'm actually plotting a lot of complex polygons (not just 2 planes as in the code above), making me want to stick with Polygon and Graphics3D.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.