I'd like to have a checkbox in a Manipulate expression, governing whether part of the graphics is displayed or not. For instance, assume that I have a surface with two planes:
Show[Plot3D[x^2+y^2,{x,-1,1},{y,-1,1},PlotStyle->Opacity[0.5]],
ParametricPlot3D[{0, u, v}, {u, -1, 1}, {v, -1, 1}, PlotStyle -> Opacity[0.5], Mesh -> None],
ParametricPlot3D[{u, 0, v}, {u, -1, 1}, {v, -1, 1}, PlotStyle -> Opacity[0.5], Mesh -> None]]
Now I'd like to wrap it in a Manipulate with two checkboxes, enabling or disabling the planes. Currently, I'm doing something like this:
Manipulate[
Apply[Show,
Join[{Plot3D[...]},
If[xzero, {ParametricPlot3D[{0, u, v}, {u, -1, 1}, {v, -1, 1},
PlotStyle -> Opacity[0.5], Mesh -> None]}, {}],
If[yzero, {ParametricPlot3D[{u, 0, v}, {u, -1, 1}, {v, -1, 1},
PlotStyle -> Opacity[0.5], Mesh -> None]}, {}]]],
{{xzero, True, "x=0"}, {True, False}}, {{yzero, True, "y=0"}, {True,
False}}]
but somehow feel it's overly complicated. What is the right way to do this?


