# Plot surface defined by inequality

I have an inequality which looks like

5 < x < 25 && 5 < y < 25 && z == 3


And I would like to plot this surface. However, RegionPlot3D returns a blank when z==3.

RegionPlot3D[ 5 < x < 25 && 5 < y < 25 && z == 3, {x, 0, 30}, {y, 0, 30}, {z, 0, 5}] I have to manually change the z equality to something like

  RegionPlot3D[ 5 < x < 25 && 5 < y < 25 && 2.8 < z < 3, {x, 0, 30}, {y, 0, 30}, {z, 0, 5}] Is there a better way to plot this surface?

• Is this a general question? Because if not then you can just use Polygon here. – Kuba Feb 24 '18 at 11:02

For arbitrary implicite regions it is easy to use:

R = ImplicitRegion[5 < x < 25 && 5 < y < 25 && z == 3, {x, y, z}];
Region[R, PlotRange -> {{0, 30}, {0, 30}, {0, 5}}, Boxed -> True,Axes -> True] There is a simple workaround.

Choose PlotPoints so that there are points to be plotted at exactly z==3. For example with {z,1,5} choose 3 as the lowest odd number of PlotPoints in z direction. But in order not to get round edges, choose high numbers for x and y direction, best multiples of the x-range and y-range.

RegionPlot3D[
5 < x < 25 && 5 < y < 25 && z == 3, {x, 0, 30}, {y, 0, 30}, {z, 1,
5}, PlotPoints -> {60, 60, 3}] 