I've simplified my code to what can reproduce my error. Basically, I have two lines:
spherePoint[x_] := Graphics3D[Sphere[{x, 0, 0}, 1]];
Manipulate[Show[spherePoint[m]], {{m, 1}, -Pi/2, Pi/2}]
This runs perfectly fine when I evaluate it in Mathematica notebook, but when I do a CDF preview (or export), it gives me the error
Show::gtype: spherePoint is not a type of graphics. >>
What gives?! Show should accept a Graphics3D
, and spherePoint
is a graphics 3D object! (I'm not sure about the last part of that sentence, because it's a function that gives a graphics 3d object, but I don't know what that implies for the program)
What am I doing wrong?
SaveDefinitions -> True
to yourManipulate
command. $\endgroup$ – Mark McClure Dec 12 '12 at 20:27PlotRange->3
in theShow
expression; otherwise, the sphere doesn't appear to move as you change the slider. $\endgroup$ – murray Dec 13 '12 at 16:48