$$\begin{align*} f(x,y)&=1+y^2\\ \mathbf r(t)&=2\cos t\,\mathbf i+2\sin t\,\mathbf j,\qquad 0\le t\le 2\pi \end{align*}$$
How do I draw the solid shown above given the $f(x,y)$ and $r(t)$ provided?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this community$$\begin{align*} f(x,y)&=1+y^2\\ \mathbf r(t)&=2\cos t\,\mathbf i+2\sin t\,\mathbf j,\qquad 0\le t\le 2\pi \end{align*}$$
How do I draw the solid shown above given the $f(x,y)$ and $r(t)$ provided?
Following the comments under the question I made a summary of three proposed solutions:
Michael E2's Plot3D
solution:
Plot3D[1+y^2,{x,y}∈Disk[{0,0},2],
Mesh->None,PlotStyle->GrayLevel[0.5,0.5],Filling->Axis,
PlotRange->{0,Automatic},BoxRatios->Automatic
]
J. M.'s slightly less busy's Plot3D
solution:
Plot3D[1+y^2,{x,y}∈
ParametricRegion[{r Cos[t],r Sin[t]},{{r,0,2},{t,0,2 π}}],
Mesh->None,PlotStyle->GrayLevel[0.5,0.5],
Filling->Axis,PlotRange->{0,Automatic},BoxRatios->Automatic
]
An implementation based on two ParametricPlot3D
(as proposed by Michael E2?):
Show[{
ParametricPlot3D[{2Cos[ϕ],2Sin[ϕ],z},{ϕ,0,2π},{z,0,6},
RegionFunction->({x,y,z}|->z<1+y^2),Mesh->None,
PlotStyle->GrayLevel[0.5,0.5]],
ParametricPlot3D[{x,y,1+y^2},{x,-2,2},{y,-2,2},
RegionFunction->({x,y,z}|->x^2+y^2<=2^2),
Mesh->None,PlotStyle->GrayLevel[0.5,0.5],
BoundaryStyle->Black]
}]
Improve the plot by RegionFunction
.
f[x_, y_] = 1 + y^2;
Plot3D[{f[x, y], 0}, {x, -2, 2}, {y, -2, 2},
PlotPoints -> 50, MaxRecursion -> 2,
RegionFunction ->
Function[{x, y}, {x, y} ∈ Disk[{0, 0}, 2]],
PlotStyle -> Gray, Mesh -> None, Lighting -> "Accent",
Boxed -> False, Axes -> False, Filling -> Axis, BoxRatios -> 1,
FillingStyle -> Gray, ViewPoint -> {-2.87, -1.26, 1.25}]
Plot3D[1 + y^2, {x, y} \[Element] Disk[{0, 0}, 2], Mesh -> None, PlotStyle -> GrayLevel[0.5, 0.5], Filling -> Axis, PlotRange -> {0, Automatic}, BoxRatios -> Automatic]
. There's alsoParametricPlot3D
if you prefer more control. $\endgroup$Plot3D[1 + y^2, {x, y} ∈ ParametricRegion[{r Cos[t], r Sin[t]}, {{r, 0, 2}, {t, 0, 2 π}}], Mesh -> None, PlotStyle -> GrayLevel[0.5, 0.5], Filling -> Axis, PlotRange -> {0, Automatic}, BoxRatios -> Automatic]
. I'll let someone else fiddle with the styling. $\endgroup$