I want to see a dynamic rendering of this surface as a function of the parameter \[Alpha]:
XSTsurface :=
RevolutionPlot3D[2 + ArcTan[α x], {x, -10, 10},
RevolutionAxis -> {1, 0, 0}, Axes -> False,
AxesOrigin -> {0, 0, 0}, Boxed -> False, Mesh -> None,
PlotStyle -> Opacity[0.3],
ColorFunction ->
Function[{x, y, z}, Hue[0.5 - 0.5 (2.0 + 0.5 ArcTan[x])]]];
This one works fine:
α = 0.7;
{Slider[Dynamic[α], {0, 1, 0.05}] , Dynamic[α] }
Dynamic[XSTsurface]
but this one doesn't:
Manipulate[XSTsurface, {α, 0, 1}]
What is it I am missing? I would have thought the two approaches should be pretty much equivalent (except for cosmetics)
Manipulatecreates a newSymbolName(It's a derivative ofDynamicModuleafter all). It can be seen in this code:Manipulate[SymbolName[Unevaluated@s], {s, 0, 1}]. If you want to makeXSTsurfacechange whenαchanges, you need to makeXSTsurfacea function. That is,XSTsurface[α_] := ...andManipulate[XSTsurface[α], {α, 0, 1}]. – JungHwan Min Aug 04 '16 at 15:38LocalizeVariables->Falsetoo. – Kuba Aug 04 '16 at 15:39