I am just learning tikz with still image. This is my first trying to create animation.
I have this code:
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\tdplotsetmaincoords{0}{0}
\definecolor{ocre}{RGB}{243,102,25}
\colorlet{mild}{ocre!50}
\begin{document}
\begin{tikzpicture}[y={(0,-0.385cm)},z={(0,1cm)},scale=1.25]
\fill[rotate around z=10, mild] (0,0) -- (0,0,2) -- (1,0,2) -- (1,0,0) -- cycle;
\draw (1,0) arc (0:180:1);
\draw[dashed] (-1,0) arc (180:360:1);
\draw (0,0,2) circle (1);
\draw[rotate around z=40, dashed] (1,0,0) -- (0,0) -- (0,0,2);
\draw[rotate around z=40] (0,0,2) -- (1,0,2) -- (1,0,0);
\draw (-1,0,0) -- (-1,0,2);
\draw (1,0,0) -- (1,0,2);
\draw[rotate around z=40, scale=0.8] (0,0,0.3) -- (0.3,0,0.3) -- (0.3,0,0);
\begin{scope}[xshift=3cm]
\tdplotsetrotatedcoords{0}{40}{0};
\fill[mild,tdplot_rotated_coords] (0,0,0) arc (-90:90:1);
\draw[tdplot_rotated_coords] (0,0,0) arc (-90:90:1);
\tdplotsetrotatedcoords{0}{0}{0};
\draw[tdplot_rotated_coords] (0,1,0) circle (1);
\draw[dashed,tdplot_rotated_coords] (0,2,0) -- (0,0,0);
\draw (1,0,1) arc (0:180:1);
\draw[dashed] (-1,0,1) arc (180:360:1);
\end{scope}
\end{tikzpicture}
\end{document}
Notice that if I change the value of $z$ here:
\fill[rotate around z=10, mild] (0,0) -- (0,0,2) -- (1,0,2) -- (1,0,0) -- cycle;
from z=20, to z=10, to z=0, z = -10, z = -20, etc. it will make the orange shade circling 360 degree. I want this animation. How to create it.
Including the orange shade of the sphere too, can we create the animation of the shade circling 360 degree?


