I'm learning how to produce animations in LaTeX. After some trials with different pictures, I would like to animate the following picture and start from the answer that Marmot provided me in this question Drawing a simple plane in 3D space. In particular, I would like to move the gray rectangle around (0,0,0) and lift it up, in order to illustrate what happens if it starts to intesect the positive orthant. The following MWE does something else, as it animates the dimensions of the rectangle. I think I should rather define the rectangle in terms of a plane and then I will change its slope. How can I do?
\documentclass{beamer}
\usepackage{amsmath} % need for subequations
\usepackage{amsfonts}
\usepackage{tikz}
\usetikzlibrary{calc, shadings}
\usetikzlibrary{calc,intersections}
\usetikzlibrary{positioning,arrows.meta}
\usepackage{pgf,tikz,pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\usepackage{animate}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d} %add it to draw the plane
\makeatletter
\tikzoption{canvas is xy plane at z}[]{%
\def\tikz@plane@origin{\pgfpointxyz{0}{0}{#1}}%
\def\tikz@plane@x{\pgfpointxyz{1}{0}{#1}}%
\def\tikz@plane@y{\pgfpointxyz{0}{1}{#1}}%
\tikz@canvas@is@plane
}
\makeatother
\let\oldemptyset\emptyset
\begin{document}
\begin{frame}
\tdplotsetmaincoords{105}{-30}
\begin{animateinline}[loop,poster=first,controls]{30}
\multiframe{36}{rt=0+10}
{
\begin{tikzpicture}[tdplot_main_coords,font=\small]
\tdplotsetrotatedcoords{00}{30}{0}
\begin{scope}[tdplot_rotated_coords]
\begin{scope}[canvas is xy plane at z=0]
\fill[blue!40,fill opacity=0.3] (-{cos(\rt)*5},-{sin(\rt)*5}) rectangle ({cos(\rt)*5},{sin(\rt)*5});
\draw[very thick] (-2,0) -- (2,0); %draws market line
\path (-150:2) coordinate (H) (-1.5,0) coordinate(X);
\pgflowlevelsynccm
\draw[very thick,-stealth,gray] (0,0) -- (-30:1.5); %draws ``projection'' of $\Phi$
\end{scope}
\draw[stealth-] (H) -- ++ (-1,0,0.2) node[pos=1.3]{$H$}; %draws arrow
\draw[stealth-] (X) -- ++ (0,1,0.2) node[pos=1.3]{$X$}; %draws arrow
\draw[very thick,-stealth] (0,0,0) coordinate (O) -- (0,0,3) node[right]{$\varphi$}; %draws vector
\end{scope}
\pgfmathsetmacro{\Radius}{1.5} %using a macro
\draw[-stealth] (O)-- (2.5*\Radius,0,0) node[pos=1.15] {spot $0$};
\draw[-stealth] (O) -- (0,3.5*\Radius,0) node[pos=1.15] {spot $2$};
\draw[-stealth] (O) -- (0,0,2.5*\Radius) node[pos=1.05] {spot $1$};
\end{tikzpicture}
}
\end{animateinline}
\end{frame}
\end{document}

\fill[blue!40,fill opacity=0.3] (-{cos(\rt)*5},-5,-{sin(\rt)*5}) -- (-{cos(\rt)*5},5,-{sin(\rt)*5}) -- ({cos(\rt)*5},5,{sin(\rt)*5}) -- ({cos(\rt)*5},-5,{sin(\rt)*5}) -- cycle;outside thecanvas is xy plane ...scope give you what you want? – Jun 26 '19 at 14:20\useasboundingbox ( ... , ... ) rectangle ( ... , ... );) large enough to encompass all objects. – AlexG Jun 26 '19 at 14:35\documentclass[export]{standalone}and open PDF in the viewer of your choice. Then PgUp/PgDn. – AlexG Jun 26 '19 at 15:14\documentclass[dvisvgm]{article}\pagestyle{empty}, thenlatex+latex+dvisvgm --font-format=woff --exact --zoom=-1and open SVG in Chromium. After changes to the sources and recompilation just click reload button in the web browser. – AlexG Jun 26 '19 at 15:20\tdplotsetrotatedcoords, then start a scopetdplot_rotated_coordsand then thecanvas is xy plane ...scope. – Jun 26 '19 at 16:35animateinline, though, but I believe it should work there, too. If you tell me whether or not the above suggestion is correct, or what you would like to have instead, I could try out. – Jun 26 '19 at 19:23