I'm having difficulty producing a proper animated gif (for inclusion in a PowerPoint presentation). The code I have is this:
HSBhsl[h_, s_, l_] :=
Module[{H, S, B}, H = h; B = l + s (1 - Abs[2 l - 1])/2;
S = (2 B - l)/B; {H, S, B}]
TestCube[\[Theta]_] :=
Graphics3D[Rotate[{EdgeForm[], Hue[HSBhsl[32/250, 228/250, 105/256]],
Cuboid[{0, 0, 0}, {1, 1, 1}]}, -\[Theta] Degree, {0, 0, 1}, {1, 1,
1}], Lighting -> {{"Ambient",
RGBColor[0.7, 0.7, 0.7]}, {"Directional",
RGBColor[0.35, 0.35, 0.35], ImageScaled[{0, 5, 0}]}},
Boxed -> False, Background -> None,
PlotRange -> 4 {{-1, 1}, {-1, 1}, {-1, 1}}, ViewAngle -> Pi/10000]
The animation is then produced like so:
list = Table[
Show[TestCube[t], ViewPoint -> {1000, 1000, 1000}], {t, 0, 360, 1}];
SetDirectory@NotebookDirectory[];
Export["CubesAnimation.gif", list, "TransparentColor" -> White]
Unfortunately, this produces an amimation that seems to stack images on top of each other, thus giving the appearance of a "trace" left by the previous frame. I tried adding "TransitionEffect" -> Background
, but this had no effect.
How do I get a proper GIF animation, with a transparent background, of the rotating cube?
Export["CubesAnimation.gif", list]
seems to produce a "proper" GIF. $\endgroup$