Ask Your Question
1

Plotting an inequality in 3D region

asked 2016-05-01 18:36:45 +0100

DBS gravatar image

updated 2016-05-01 19:15:13 +0100

calc314 gravatar image

Ideally I would like to plot a region in 3D space which is defined by a bunch of inequalities. For example let us consider the region $R$ defined by $$ { (x,y, z): x \le 0 \text{ and } y \le 0 \text{ and } x+y \le z } $$.

I am wondering what would be an easier way to do it.

With my limited knowledge I came up with these two approaches.

Approach 1 : Generate points in this region and plot them in 3D. Is there a way to extend the function in region_plot () that generates plot points for my needs?

Approach 2 : Concatenate implicit -3D plots of functions of the form $ x + y - (z+t) $, where $t$ is a small positive parameter, for different values of $t$. Then plot all these simultaneously.

I would appreciate any alternate way to do this or any improvements on these approaches.
Thank you for your time in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-05-02 13:35:17 +0100

calc314 gravatar image

I'm not aware of an easy way to do this. But, here is one idea:

var('x y z')
p=implicit_plot3d(x+y==z,(x,-4,0),(y,-4,0),(z,-10,0))
p+=polygon3d([(-4,0,-4),(0,0,0),(-4,0,0) ])
p+=polygon3d([(0,-4,-4),(0,0,0),(0,-4,0) ])
p+=polygon3d([(-4,0,-4),(-4,-4,-8),(-4,0,0),(-4,-4,0) ])
p+=polygon3d([(0,-4,-4),(-4,-4,-8),(0,-4,0) ,(-4,-4,0) ])
p
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-05-01 18:36:45 +0100

Seen: 1,073 times

Last updated: May 02 '16