I am using Mathematica 12 on Mac.
I would like to export the following code to a CDF file.
g1[a_] := ParametricPlot3D[{a*Cos[\[Theta]]*Sin[\[Phi]],
a*Sin[\[Theta]]*Sin[\[Phi]], a*Cos[\[Phi]]}, {\[Theta], 0,
2 \[Pi]}, {\[Phi], \[Pi]/2, \[Pi]}, Mesh -> 50,
MeshStyle -> Opacity[.2],
PlotStyle -> {Directive[{Green, Opacity[0.15], Thickness[.005]}]}];
level = 0;
p4 = Graphics3D[{Polygon[{{-2.2, -2.2, level}, {-2.2, 2.2,
level}, {2.2, 2.2, level}, {2.2, -2.2, level}}]},
Opacity[0.05], Lighting -> "Neutral"];
shh1 = Manipulate[Show[g1[a], p4], {{a, 1}, 1, 5, 1/50}];
I searched around and found this command:
CDFDeploy["happy.cdf", shh1]
But the output (the happy.cdf) is only a static pictute, without interactive manipulation.
Could anyone help me with a hint?
without interactive manipulation
how do you expect this interaction to show up? By itself? You have not done any interactive manipulation in the code you are exporting. You just exported a static image so naturally the CDF will contain a static image. $\endgroup$ – Nasser May 3 '20 at 10:24Dynamic
content. Something likeDynamic
module orManipulate
. Rotating that content you saved using mouse and such does not work on its own, either if you open the CDF file using the CDF Player or open the CDF file using Mathematica itself. The content needs to be Dynamic for any interaction. $\endgroup$ – Nasser May 3 '20 at 11:22