0
$\begingroup$

I'm asking if there is a way to animate a function $f(x)$ (plotted in a range $(a, b)$ with $a > 0$ and $b > 0$), making it to revolve around the $Y$ axis and showing the solid of revolution obtained in this way.

For example, say $f(x) = 1/x$ in the range $x\in(1, 5)$. I know how to plot the solid of revolution obtained from this, but it's the animation part, if possible, that I would like to understand.

Thank you!

To make things clarer: a code like this would workg well

Manipulate[

Show[

ParametricPlot3D[{u^2, 0, u}, {u, 0, 1}, 
PlotStyle -> Directive[Red, Thick]],

RevolutionPlot3D[Sqrt[x], {x, 0, 1}, {t, 0, T}, 
PlotStyle -> {Opacity[.5], Specularity[White, 10]}, 
ColorFunction -> "Rainbow", MeshStyle -> Opacity[.3], 
MeshShading -> ms, PlotPoints -> 30]

, Axes -> True, Boxed -> False, BoxRatios -> {1, 1, 1.5}, 
AxesOrigin -> {0, 0, 0}, PlotRange -> {{-1, 1}, {-1, 1}, {0, 1}}, 
ViewPoint -> {1.1, 2.6, 1.73}, ViewVertical -> {1.4, 0.3, 0.2}, 
SphericalRegion -> True, ViewAngle -> .4, ImageSize -> 600, 
AxesStyle -> Directive[Black, Thick]]

, {{ms, None, 
"shades"}, {None -> "NO", {{Red, Yellow}, {Pink, Orange}} ->    "YES"}}
, {{T, 2 Pi}, .001, 2 Pi, Appearance -> "Labeled"}, 
FrameMargins -> 0]

Just needs to be adapted to a revolution around $Y$ axis, and to other possible functions.

( Taken from RevolutionPlot3D: but NOT revolving about the z axis )

$\endgroup$
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.