5
$\begingroup$

I'm wanting to plot the solid of revolution from the area between two functions such as: $1\leq x \leq e$ and $1 \leq y \leq 2 + ln(x)$, doing something like this:

f[x_]:=2+Log[x]
g[x_]:=1
RevolutionPlot3D[{{f[x]}, {g[x]}}, {x, 1, E},
 RevolutionAxis -> x, AxesOrigin -> {0, 0, 0},
 Boxed -> False, Mesh -> {5, 0}, PlotRange -> {{0, 3}, All},
 PlotStyle -> Opacity[0.5]]

plot

Is there a way to fill this empty space between $f(x)$ and $g(x)$?

$\endgroup$
7
$\begingroup$

This one doesn't need V10:

RegionPlot3D[ 1 < Sqrt[z z + y y] < 2 + Log[x], {x, 1, E}, {y, -4, 4}, {z, -4, 4}, 
              Mesh -> None, AspectRatio -> 1, PlotRange -> {{0, 4}, {-4, 4}, {-4, 4}}]

Mathematica graphics

$\endgroup$
  • $\begingroup$ this is much nicer graphic...and a much nicer inequality (which I should have exploited...+1 obviously $\endgroup$ – ubpdqn Sep 7 '14 at 7:57
  • $\begingroup$ Very elegant code and result, Thank you! $\endgroup$ – duarthiago Sep 7 '14 at 13:14
  • $\begingroup$ @ubpdqn Thanks. The "nicer" part really depends on the plot range. Try using {x, 1/2, E} instead of {x, 1, E} and see by yourself. $\endgroup$ – Dr. belisarius Sep 7 '14 at 15:13
4
$\begingroup$
ir = ImplicitRegion[
  g[x]^2 <= y^2 + z^2 <= f[x]^2 && 1 < x < E, {x, y, z}];
RegionPlot3D[ir, PlotPoints -> 20]

enter image description here

or

DiscretizeRegion[ir]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.