2
$\begingroup$

I have the following code:

RegionPlot3D[x + y + z <= 3 && x + z <= 1, {x, 0, 3}, {y, 0, 3}, {z, 0, 2} , BoxRatios -> Automatic, AxesLabel -> Automatic]

To get the following picture seen from below:

enter image description here

As you can see, 3 diferent lines appear when I'm just intersecting 2 semiplanes.

I have tried with different mesh options but i couldn't find the key to this problem.

$\endgroup$
3
  • $\begingroup$ add the option PlotPoints -> 200? $\endgroup$ – kglr Nov 3 '20 at 12:21
  • $\begingroup$ or the options PlotPoints -> 60, and MaxRecursion -> 7? $\endgroup$ – kglr Nov 3 '20 at 12:22
  • $\begingroup$ @klgr Using PlotPoints -> 100 does the trick, but it takes a little bit longer. But thanks I didnt't know that option. $\endgroup$ – Alejandro Mahillo Nov 3 '20 at 14:47
1
$\begingroup$

For plane, we can decreasing the MaxCellMeasure instead of increasing it.

reg = ImplicitRegion[
   x + y + z <= 3 && x + z <= 1 && 0 <= x <= 3 && 0 <= y <= 3 && 
    0 <= z <= 2, {x, y, z}];
RegionPlot3D[DiscretizeRegion[reg, MaxCellMeasure -> 1]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.