2
$\begingroup$

I faced a strange behavior of a RegionPlot3D. I am drawing a piece of a plane bounded by a parabola. This works:

    RegionPlot3D[
 z < 1 - V^2 && (-0.001 < x < 0.001), {x, -0.9, 0.9}, {V, 0, 1.2}, {z,
   0, 1}]

enter image description here

Now I would like to shift it over -0.1 along x:

 RegionPlot3D[
 z < 1 - V^2 && ((-0.001 - 0.1) < x < (0.001 - 0.1)), {x, -0.9, 
  0.9}, {V, 0, 1.2}, {z, 0, 1}]

with the following result:

enter image description here

Do I miss something? If not, do you see a workaround?

$\endgroup$
  • $\begingroup$ {x, -1, 0.8} Works, looks like a rendering bug though $\endgroup$ – Feyre Jun 17 '16 at 14:40
  • $\begingroup$ @Feyre Yes, but -1 < x < -0.99 does not work $\endgroup$ – Alexei Boulbitch Jun 17 '16 at 14:44
  • $\begingroup$ I think with the thinness of the slice, you just have to find a sweet spot where it will render. $\endgroup$ – Feyre Jun 17 '16 at 14:48
  • $\begingroup$ add this: PlotPoints -> {100, Automatic, Automatic} $\endgroup$ – george2079 Jun 17 '16 at 15:21
4
$\begingroup$

The documentation for RegionPlot3D states

You should realize that since it uses only a finite number of sample points, it is possible for RegionPlot3D to miss regions in which pred is True. To check your results, you should try increasing the settings for PlotPoints and MaxRecursion.

This is what happened in your second example, a result of the region being so thin.

As commented by george2079, you can increase the sampling in the x direction only with the option PlotPoints -> {100, Automatic, Automatic}:

RegionPlot3D[z < 1 - V^2 && ((-0.001 - 0.1) < x < (0.001 - 0.1)), 
  {x, -0.9, 0.9}, {V, 0, 1.2}, {z, 0, 1},
  PlotPoints -> {100, Automatic, Automatic}]

enter image description here

You might also be interested in the contourRegionPlot3D function here:

contourRegionPlot3D[z < 1 - V^2 && ((-0.001 - 0.1) < x < (0.001 - 0.1)), 
  {x, -0.9, 0.9}, {V, 0, 1.2}, {z, 0, 1}]

enter image description here

$\endgroup$
  • $\begingroup$ Thank you, the contourRegionPlot3D is certainly a good idea. $\endgroup$ – Alexei Boulbitch Jun 20 '16 at 7:36

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.