Ask Your Question

Revision history [back]

The line

lambda x,y,z: y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3

just defines a function that takes x,y,z as arguments, and that returns the boolean $(y - 2*x<= 0 and 0<x and="" x&lt;2="" and="" 0<y="" and="" y&lt;3)$.<="" p="">

To solve your second question, one could think about defining

sage: implicit_plot3d(0, (x, -3, 3), (y, -3, 3), (z, -3, 3), plot_points=100, region=lambda x,y,z: y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3).show()

but the function 0 does not define a surface but a volume, and plot3d does not show anything.

A possible workaround could be to plot many parallel surfaces:

sage: implicit_plot3d(z, (x, -3, 3), (y, -3, 3), (z, -3, 3), plot_points=100, contour=[i/100 for i in range(100)], region=lambda x,y,z: y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3).show()

The line

lambda x,y,z: y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3

just defines a function that takes x,y,z as arguments, and that returns the boolean $(y - 2*x<= 0 and 0<x and="" x&lt;2="" and="" 0<y="" and="" y&lt;3)$.<="" p=""> and x<2 and 0<y and y<3).

To solve your second question, one could think about defining

sage: implicit_plot3d(0, (x, -3, 3), (y, -3, 3), (z, -3, 3), plot_points=100, region=lambda x,y,z: y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3).show()

but the function 0 does not define a surface but a volume, and plot3d does not show anything.

A possible workaround could be to plot many parallel surfaces:

sage: implicit_plot3d(z, (x, -3, 3), (y, -3, 3), (z, -3, 3), plot_points=100, contour=[i/100 for i in range(100)], region=lambda x,y,z: y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3).show()

The line

lambda x,y,z: y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3

just defines a function that takes x,y,z as arguments, and that returns the boolean $(y (y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3).

To solve your second question, one could think about defining

sage: implicit_plot3d(0, (x, -3, 3), (y, -3, 3), (z, -3, 3), plot_points=100, region=lambda x,y,z: y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3).show()

but the function 0 does not define a surface but a volume, and plot3d does not show anything.

A possible workaround could be to plot many parallel surfaces:

sage: implicit_plot3d(z, (x, -3, 3), (y, -3, 3), (z, -3, 3), plot_points=100, contour=[i/100 for i in range(100)], region=lambda x,y,z: y - 2*x<= 0 and 0<x and x<2 and 0<y and y<3).show()