wxMaxima CAS: How to make the contour surface to appear at the z=0 level?

81 Views Asked by At

The gnuplot image below shows the contour plane below the z=0 level.

How can I make it to appear at the z=0 level?

Code:
load("draw");
draw3d(xlabel = "x_1", ylabel = "x_2", zlabel = "y",
surface_hide = true,
color=gray,
explicit(10-(x-2)^2-(1.5y-2)^2, x,0,3, y,0,3),
contour_levels = {7,8,9,9.5,9.9,9.99,9.999,9.9999}, contour = both,
explicit(10-(x-2)^2-(1.5
1-2)^2, x,0,3, y,1,1),
explicit(10-(1-2)^2-(1.5*y-2)^2, x,1,1, y,0,3),
color=black,point_type=filled_circle,
points([[1,1,10-1-0.5^2]]));

image: wxMaxima image

1

There are 1 best solutions below

0
On

After a long search on Maxima and Gnuplot manuals, I've found and option that does the trick. Use the following option inside the draw3d function:

user_preamble = "set xyplane at 0",

so than the modified original function becomes:

load("draw");
draw3d(xlabel = "x_1", ylabel = "x_2", zlabel = "y",
user_preamble = "set xyplane at 0",
surface_hide = true,
color=gray,
explicit(10-(x-2)^2-(1.5y-2)^2, x,0,3, y,0,3),
contour_levels = {7,8,9,9.5,9.9,9.99,9.999,9.9999}, contour = both,
explicit(10-(x-2)^2-(1.51-2)^2, x,0,3, y,1,1),
explicit(10-(1-2)^2-(1.5
y-2)^2, x,1,1, y,0,3),
color=black,point_type=filled_circle,
points([[1,1,10-1-0.5^2]]));

Image: enter image description here