# How to draw the 3D plot in mathematica?

I want to draw the following plot----

Let, $x=\{0,0.1,\cdots,1\}$ and $y=\{0,0.1,\cdots,1\}$;

Now, I have two different scenarios:

Scenario-1: $N=\{x\}$ or $N=\{y\}$

then if $N=\{x\}$, then $z=x$ or if $N=\{y\}$, then $z=y$;

Scenario-2: $N=\{x,y\}$

then $z=1-(1-x)(1-y)$

The plot should contain both the scenarios.

for the second case, I do this

Plot3D[1 - (1 - x) (1 - y), {x, 0, 1}, {y, 0, 1}]

Then how to combine Scenario 1 with it?

I understand that you have tree surfaces, being planes two of them, so:

ContourPlot3D[{z - y == 0, z - y == 0, (1 - x) (1 - y) + z == 1}, {x,
0, 1}, {y, 0, 1}, {z, 0, 1}, ContourStyle -> Opacity[0.6],
Mesh -> None, AxesLabel -> (Style[#, 16, Bold] & /@ {"x", "y", "z"}),
SphericalRegion -> True]


I am considering the first scenario again. If you are meaning that $z=x$ when $N=\{x,0\}$ and $z=y$ when $N=\{0,y\}$, then:

ContourPlot3D[{x == 0, y == 0, (1 - x) (1 - y) + z == 1}, {x,
0, 1}, {y, 0, 1}, {z, 0, 1}, ContourStyle -> Opacity[0.6],
Mesh -> None, AxesLabel -> (Style[#, 16, Bold] & /@ {"x", "y", "z"}),
SphericalRegion -> True]


Have you tried Show?

Plot1=Plot3D[1 - (1 - x) (1 - y), {x, 0, 1}, {y, 0, 1}]
Plot2=Plot3D[x, {x, 0, 1}, {y, 0, 1}]
Show[Plot1,Plot2]


Also using Plotstyle, changing Opacity or color can help for better representation.

use the following:

Plot3D[{x, 1 - (1 - x) (1 - y)}, {x, 0, 1}, {y, 0, 1}]


you can plot them separately as follows:

Plot3D[1 - (1 - x) (1 - y), {x, 0, 1}, {y, 0, 1}]

Plot3D[x, {x, 0, 1}, {y, 0, 1}]

• see my edit? but how to combine them in one plot? Commented Nov 16, 2017 at 6:06