I came up with this method to plot the traces of the surface $z=4x^2+y^2$, in this case for $z=1$, 2, 3, and 4.
ContourPlot3D[{z == 4 x^2 + y^2, z == 1, z == 2, z == 3,
z == 4}, {x, -2, 2}, {y, -2, 2}, {z, 0, 4.01},
ContourStyle -> {Opacity[0.3]},
PlotPoints -> 30, MaxRecursion -> 3,
Mesh -> {{1, 2, 3, 4}}, MeshFunctions -> {#3 &},
MeshStyle -> {Thick, Red},
AxesLabel -> {"x", "y", "z"}]
Which produces this image:
I am now looking for a way to hide the surface $z=4x^2+y^2$, but keep the planes and the mesh curves.
Any suggestions?
Update:
Consider obtaining traces for the surface $z=y^2-x^2$ using technique shown by MichaelE2.
ContourPlot3D[z, {x, -2, 2}, {y, -2, 2}, {z, -1.5, 1.5},
Contours -> {-1, 0, 1}, ContourStyle -> {Opacity[0.3]},
PlotPoints -> 30, MaxRecursion -> 3, Mesh -> {{0}},
MeshFunctions -> {Function[{x, y, z}, z - (y^2 - x^2)]},
MeshStyle -> Directive[Thick, Red], AxesLabel -> Automatic]
Image:
ContourPlot3D[x, {x, -2, 2}, {y, -2, 2}, {z, -1.5, 1.5},
Contours -> {-1, 0, 1}, ContourStyle -> {Opacity[0.3]},
PlotPoints -> 30, MaxRecursion -> 3, Mesh -> {{0}},
MeshFunctions -> {Function[{x, y, z}, z - (y^2 - x^2)]},
MeshStyle -> Directive[Thick, Red], AxesLabel -> Automatic]
Image:
ContourPlot3D[y, {x, -2, 2}, {y, -2, 2}, {z, -1.5, 1.5},
Contours -> {-1, 0, 1}, ContourStyle -> {Opacity[0.3]},
PlotPoints -> 30, MaxRecursion -> 3, Mesh -> {{0}},
MeshFunctions -> {Function[{x, y, z}, z - (y^2 - x^2)]},
MeshStyle -> Directive[Thick, Red], AxesLabel -> Automatic]
Image:
I think this gives students a very simple way to get the traces for a quadratic surface.
ContourStyle -> {Opacity[0.3]}
toContourStyle -> {Opacity[0.0], Opacity[0.3], Opacity[0.3], Opacity[0.3], Opacity[0.3]}
? $\endgroup$ – Gregory Rut Jun 5 '15 at 20:18ContourStyle -> {None, Opacity[0.3], Opacity[0.3], Opacity[0.3], Opacity[0.3]}
. The plot will be almost 20% smaller. (Omitting the paraboloid altogether makes the plot almost 50% smaller.) $\endgroup$ – Michael E2 Jun 5 '15 at 22:05