# How to draw 3D sets in Mathematica given inqualities

I would like to draw a 3D set ($$E$$) given the following conditions:

$$E=\{(x, y, z)\in\mathbb R^3: x, y, z \in [0, 1], x+2y-1\leq z\}$$

I have seen in the Mathematica documentation that there are several functions to draw things like that (e.g Plot3D or ParametricPlot3D). All these function does not meet my needs since I need to draw the intersection between the cube $$[0, 1]^3$$ and the semi-space $$x, +2y-1\leq z$$.

Do you know a function that can plot a set like this?

• Check the documentation for ImplicitRegion and RegionPlot3D. Jun 1, 2021 at 20:59
• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. Jun 1, 2021 at 21:00

RegionPlot3D[x + 2 y - 1 <= z,
{x, 0, 1}, {y, 0, 1}, {z, 0, 1}]


Another way is

Graphics3D[HalfSpace[{1, 2, -1}, 1],
PlotRange -> {{0, 1}, {0, 1}, {0, 1}}]


Or

reg1 = ImplicitRegion[{{x, y, z} ∈ Cuboid[],
x + 2 y - 1 <= z}, {x, y, z}];
reg2 = ImplicitRegion[
x + 2 y - 1 <= z, {{x, 0, 1}, {y, 0, 1}, {z, 0, 1}}];
reg3 = ImplicitRegion[{x + 2 y - 1 <= z, 0 <= x <= 1, 0 <= y <= 1,
0 <= z <= 1}, {x, y, z}];
reg4 = RegionIntersection[Cuboid[],
ImplicitRegion[x + 2 y - 1 <= z, {x, y, z}]];
reg5 = RegionIntersection[Cuboid[], HalfSpace[{1, 2, -1}, 1]];
Region[reg1, BaseStyle -> Orange]
RegionEqual[reg1, reg2, reg3, reg4, reg5]


True