1

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)

LCarvalho
  • 9,233
  • 4
  • 40
  • 96
Pirx
  • 4,139
  • 12
  • 37
  • 2
    Manipulate creates a new SymbolName (It's a derivative of DynamicModule after all). It can be seen in this code: Manipulate[SymbolName[Unevaluated@s], {s, 0, 1}]. If you want to make XSTsurface change when α changes, you need to make XSTsurface a function. That is, XSTsurface[α_] := ... and Manipulate[XSTsurface[α], {α, 0, 1}]. – JungHwan Min Aug 04 '16 at 15:38
  • 3
    With addition to @JHM comment, you can use LocalizeVariables->False too. – Kuba Aug 04 '16 at 15:39

0 Answers0