Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You could find a parametrization of the domain and then use parametric plot. For example, for the triangular region:

f(x,y) = 2 + sin(x) + cos(y)
parametric_plot3d((x, y*(2*pi-x), f(x, y*(2*pi-x))), (x, 0, 2*pi), (y, 0, 1), mesh=True)

Alternatively, though not as pretty, you could use an implicit plot like this:

var('x,y,z')
implicit_plot3d(z - f(x,y), (x, 0, 2*pi), (y, 0, 2*pi), (z, 0, 4), region=lambda x, y, z: bool(y < 2*pi - x))