Making a 3D-solid from RevolutionAxis
Revolve three parametric curves. {x, f[x]}
, {0, y}
and {4, y}
SetOptions[RevolutionPlot3D, Mesh -> False];
f[x_] := Sqrt[E^-x (1 + E^x)^2];
a = RevolutionPlot3D[{x, f[x]}, {x, 0, 4},
RevolutionAxis -> {1, 0, 0}, PlotStyle -> Red];
b = RevolutionPlot3D[{0, y}, {y, 0, f[0]},
RevolutionAxis -> {1, 0, 0}, PlotStyle -> Yellow];
c = RevolutionPlot3D[{4, y}, {y, 0, f[4]},
RevolutionAxis -> {1, 0, 0}, PlotStyle -> Cyan];
Show[a, b, c, Boxed -> False, Axes -> False,
ViewPoint -> {0.76, -1.39, 2.98}]
Here's another way to do it using ImplicitRegion
and the finite element method package.
Needs["NDSolve`FEM`"]
ℛ =
ImplicitRegion[y^2 + z^2 <= (Sqrt[E^-x (1 + E^x)^2])^2, {x, y, z}];
(bmesh = ToBoundaryMesh[ℛ, {{0, 4}, {-8, 8}, {-8,
8}}])["Wireframe"]
One possible advantage of using this approach is that the mesh will likely be free of defects, as shown below:
FindMeshDefects[MeshRegion[bmesh]]