I have the following code:
g[ t_, OptionsPattern[{ θ -> (0 &), u -> ({0, 0, 1} &), v -> ({0, 0, 0} &)}] ] := Graphics3D[{ Arrow[{{0, 0, 0}, {5, 0, 0}}], Arrow[{{0, 0, 0}, {0, 5, 0}}], Arrow[{{0, 0, 0}, {0, 0, 5}}], Translate[ Rotate[{ Cuboid[{-1, -1, -1}, {1, 1, 1}],Arrow[{{0, 0, 0}, {5, 0, 0}}], Arrow[{{0, 0, 0}, {0, 5, 0}}],Arrow[{{0, 0, 0}, {0, 0, 5}}] }, OptionValue[θ][t], OptionValue[u][t]], OptionValue[v][t]] }, Lighting -> {{"Ambient", White}}, Boxed -> False, ViewPoint -> {2.82, 1.61, 1.20}, PlotRange -> {{-5, 5}, {-5, 5}, {-2, 7}} ] θf := Function[t, 0.5 Sin[t]]; uf := Function[t, {Sin[t], Cos[t]^2, Sin[t] Cos[t]}]; Animate[g[t, θ -> θf, u -> uf], {t, 0, 2 π}] tt = Table[ g[t, θ -> θf, u -> uf], {t, 0, 2 π, 2 π/100} ]; Export[NotebookDirectory[] <> "ms.gif", tt] but the quality of the animated GIF obtained is poor. How can I improve it? This is an example of a frame of the image:
Moreover, when the Export run, it in some way invalidates the Animation frame. Why? I mean that the running animation becomes the source code as in the following image. I also noted that g comes back to color blue, as if it was undefined.



gturning blue again indicates a kernel crash. I don't see this problem. I suggest you upgrade to 11.0.1. It is almost always a good idea to upgrade to point releases. They fix bugs. $\endgroup$