Hi!
I'm not sure if this is the right place to ask this type of question, but how would I graph a solid bounded below by
g[x_, y_] = 9 - x^2 - 4 y^2
and above by
h[x_, y_] = 25 - 4 x^2 - 16 y^2
where the boundaries are given to be (|x| < 3 , |y| < 3 , 0 < z < 30)?
I'm required to use RegionFunction[] to limit the bounds by their intersection but when I did so, I got an odd looking graph. Here's the relevant part of the code as well as the resulting graph.
g[x_, y_] = 9 - x^2 - 4 y^2;
h[x_, y_] = 25 - 4 x^2 - 16 y^2;
i[x_, y_] = h[x, y] - g[x, y];
p1 = Plot3D[g[x, y], {x, -3, 3}, {y, -3, 3},
PlotRange -> {0, 30},
Mesh -> None,
RegionFunction -> Function[{x, y, z}, g[x, y] < i[x, y] < h[x, y]]];
p2 = Plot3D[h[x, y], {x, -3, 3}, {y, -3, 3},
PlotRange -> {0, 30},
Mesh -> None,
RegionFunction -> Function[{x, y, z}, g[x, y] < i[x, y] < h[x, y]],
PlotStyle -> {Blue, Opacity[0.5]}];
Show[{p1, p2},
PlotLabel -> "Ideal Model for a Small Jet of Ionized Particles",
AxesLabel -> {"x", "y", "z"},
BoxRatios -> {1, 1, 1},
ImageSize -> Large]