5

The last few days I have been working on a visualization of the clark/park-transformation used in electrical engineering. It's look like this: enter image description here This whole file is "dynamic", meaning that if I change the variable of the angle ("current position" under the wave forms), all of the vectors and the transformations will change accordingly.

Now I wanted to extend this to be animated.

I have checked the example Sine and Cosine functions animation, and added what needed to be added to make the angle run from 0-359.

Now... My desktop client (texmaker for windows) gave up on the rendering, and so did ShareLatex. Is this really too complicated, or is there a fault which causes and endless loop somewhere?

My complete code is here. (I attached all in case others would like to use it without animation. PS: originally i am using documentclass "standalone")

\documentclass[tikz,border=10pt]{beamer}
\usepackage{pgfplots}
\usepackage{amsmath} % Required for \varPsi below
\usepackage{tikz}
\usepackage{animate}
\usepackage{ifthen}
\usetikzlibrary{calc}
\pgfplotsset{compat=1.9}

\newcommand{\gettikzxy}[3]{%
  \tikz@scan@one@point\pgfutil@firstofone#1\relax
  \edef#2{\the\pgf@x}%
  \edef#3{\the\pgf@y}%
}

\newcounter{angle}
\setcounter{angle}{0}

\begin{document}

\begin{frame}[fragile]{Sine and Cosine functions}
\begin{center}
\begin{animateinline}[loop, poster = first, controls]{30}

\whiledo{\theangle<359}{


    \begin{tikzpicture}



    %Definitions - These can be changed to create new figures%
    %===========================================================
    \def \Vs {4}; %Magnitude of space vector in cm
    \def \Angle {\theangle}; %Angle with regards to phase A
    \def \Osv {35}; %Angle of d-axis wrt space vector
    \def \R {3}; %Magnitude of rotor flux in cm



    %Calculated variables. These should not be changed unless you know what you are doing%
    %===========================================================
    \pgfmathsetmacro \MaxLin {\Vs * cos{30}}; %Magnitude before overmodulation
    \pgfmathsetmacro \Qmag {\Vs * sin{\Osv})}; %Magnitude of Q axis
    \pgfmathsetmacro \Dmag {\Vs * cos{\Osv})}; %Magnitude of Q axis
    \pgfmathsetmacro \Marker {\Angle/45)};
    \pgfmathsetmacro \Vmax {\Vs * 2/3}; %Max phase voltage
    \def \Axisheight {\Vmax *3};
    \pgfmathsetmacro \Va {\Vmax * sin{(\Angle+0)}}; %Magnitude of phase A at angle \Angle
    \pgfmathsetmacro \Vb {\Vmax * sin{(\Angle+120)}}; %Magnitude of phase B at angle \Angle
    \pgfmathsetmacro \Vc {\Vmax * sin{(\Angle+240)}}; %Magnitude of phase C at angle \Angle
    \pgfmathsetmacro \Radius {\Vmax}; %Radius of maximum line to line voltage output


    %Locations%
    %===========================================================
    \def \OrigoX {-6 cm}; % If you want to move the circle relative to the wave forms (default -5cm)
    \def \OrigoY {0 cm};
    \def \OrigoYb {-12 cm};
    \def \OrigoYc {-24 cm};
    \coordinate (origo) at (\OrigoX,\OrigoY); %Center of top phasor diagram
    \coordinate (origob) at (\OrigoX,\OrigoYb); %Center of center phasor diagram
    \coordinate (origoc) at (\OrigoX,\OrigoYc); %Center of bottom phasor diagram
    \coordinate (phase_a) at (0:\Va cm); %Tip of phase A
    \coordinate (phase_b) at (120:\Vb cm); %Tip of phase B
    \coordinate (phase_c) at (240:\Vc cm) ; %Tip of phase C
    \coordinate (Y) at (\OrigoX+\Vs cm ,\OrigoY+0); %Where to start the Hexagon


    %Circle background rings%
    %===========================================================
    \node at (origo) [circle,thick,draw=black!80,fill=red!0, inner sep=0pt,minimum size=\Vs*2 cm] {}; %Top Circle with radius 128% 
    \node at (origob) [circle,thick,draw=black!80,fill=red!0, inner sep=0pt,minimum size=\Vs*2 cm] {}; %Center Circle with radius 128% 
    \node at (origoc) [circle,thick,draw=black!80,fill=red!0, inner sep=0pt,minimum size=\Vs*2 cm] {}; %Center Circle with radius 128% 

    %Left axis to top circle
    \draw[<->] (2.05*\OrigoX,-1.1*\Vs cm) -- (2.05*\OrigoX,1.1*\Vs cm) node[anchor=south, distance=0.2cm]{$I$};
    \draw [color=black,dotted](\OrigoX,\Vs cm)--(2.1*\OrigoX,\Vs cm) node[anchor=east, distance=0.5cm] {$\frac{4}{\pi}I_{max} - 127,32\%$};
    \draw [color=red,dotted] (\OrigoX,\MaxLin cm) -- (2.1*\OrigoX,\MaxLin cm) node[anchor=east, distance=0.5cm] {$\frac{2}{\sqrt{3}}I_{max} - 115,47\%$};
    \draw [color=black,dotted](\OrigoX,\Vmax cm) -- (2.1*\OrigoX,\Vmax cm) node[anchor=east] {$I_{max} - 100,00\%$};
    \draw [color=black,dotted](\OrigoX,0 cm) -- (2.1*\OrigoX,0 cm) node[anchor=east] {$0\%$};


    %Hexagon Framing around phasors%
    %===========================================================
    \draw[-, color=black!50,thin,dashed] (Y) -- ++(120:\Vs cm) -- ++(180:\Vs cm) -- ++(240:\Vs cm) -- ++(300:\Vs cm) -- ++(360:\Vs cm) -- ++(60:\Vs cm); % Six step hexagon
    \node at (origo) [circle,draw=red!80, inner sep=0pt,minimum size=\MaxLin*2 cm, dashed] {}; %Circle with radius 115% 



    %Black guide lines with angle notation
    \foreach \x in {45,90,...,360} {
        \draw[-,color=black,dotted, thin] (origo)  -- ++(\x:\Vs cm) node[label={[label distance=-0.18cm]\x: $\x^{\circ}$}] {};
    } \foreach \x in {45,90,...,360} {
        \draw[-,color=black,dotted, thin] (origob)  -- ++(\x:\Vs cm) node[label={[label distance=-0.18cm]\x: $\x^{\circ}$}] {};
    } \foreach \x in {45,90,...,360} {
        \draw[-,color=black,dotted, thin] (origoc)  -- ++(\x:\Vs cm) node[label={[label distance=-0.18cm]\x: $\x^{\circ}$}] {};
    } 





    %=============================================================================================================
    %Actual three phase phasors%
    %=============================================================================================================
    \node at (origo) [circle,thick,draw=black!80, inner sep=0pt,minimum size=\Vmax*2 cm] {}; %Circle with radius 100%
    \draw[->,color=red, very thick] (origo)  -- ++(phase_a); %Phase A phasor
    \draw[->,color=blue, very thick] (origo)  -- ++(phase_b); %Phase B phasor
    \draw[->,color=green, very thick] (origo)  -- ++(phase_c); %Phase C phasor

    \draw[color=red,thick,smooth,domain=0:8] plot(\x,{\Vmax * sin(\x*45)}); % Phase A
    \draw[color=blue,thick,,smooth,domain=0:8] plot(\x,{\Vmax * sin((\x*45)+120)}); %Phase B
    \draw[color=green,thick,,smooth,domain=0:8] plot(\x,{\Vmax * sin((\x*45)+240)}); % Phase C

    \draw[color=red,dashed] (\Marker,\Va) -- (-0.3,\Va)  node[anchor=east] {$i_a$};; %A phase line to Y-axis
    \draw[color=blue,dashed] (\Marker,\Vb)-- (-0.3,\Vb)  node[anchor=east] {$i_b$};; %B phase line to Y-axis
    \draw[color=green,dashed] (\Marker,\Vc)-- (-0.3,\Vc)  node[anchor=east] {$i_c$};; %C phase line to Y-axis

    %SPACE VECTOR %
    \draw[->,ultra thick,black] (origo) -- ++($(phase_a) + (phase_b) + (phase_c)$) coordinate(Vstip); %Space vector resultant
    \pgfgetlastxy{\XCoord}{\YCoord}; % X and Y coordinates of Space vector tip

    %Find space vector angle
    \pgfmathanglebetweenpoints{\pgfpointanchor{origo}{center}}{\pgfpointanchor{Vstip}{center}}
    \let\PhaseBlack\pgfmathresult;

    %Phasor guide lines%
    \draw[-,color=red, dashed] (origo)  -- ++(0:\Vmax cm)  node[anchor=west] {\large $i_a$};
    \draw[-,color=blue, dashed] (origo) -- ++(120:\Vmax cm) node[anchor=south] {\large $i_b$};
    \draw[-,color=green, dashed] (origo)  -- ++(240:\Vmax cm) node[anchor=north] {\large $i_c$};

    \draw[-,color=red, dashed] (origo)  -- ++(0:-\Vmax cm) node[anchor=east] {$-i_a$};
    \draw[-,color=blue, dashed] (origo) -- ++(120:-\Vmax cm)  node[anchor=north] {$-i_b$};
    \draw[-,color=green, dashed] (origo)  -- ++(240:-\Vmax cm) node[anchor=south] {$-i_c$};

    \draw[->,color=blue, thin] (origo) ++(phase_a) -> ++(phase_b); %Resultant help lines
    \draw[->,color=green, thin] (origo) ++(phase_a) ++(phase_b) -> ++(phase_c); %Resultant help lines

    \draw[color=gray] (\OrigoX,\Vmax) -- (9,\Vmax) ; %X axis TOP inner
    \draw[color=gray] (\OrigoX,-\Vmax) -- (9,-\Vmax) ; %X axis bottom inner


    %% Rotor Flux Vector%
    %\coordinate (rfluxtip) at (\PhaseBlack-\Osv:\R); %Tip of rotor flux
    %\draw[->,color=gray] (origo)  -- ++(rfluxtip)  node[label={[label distance=-0.18cm]\PhaseBlack-\Osv: $\lambda_r$}] {}; %Rotor Flux Phasor


    %Wave form
    \draw[->, color=black] (0,0) -- (9,0) node[anchor=west] {$\theta$}; %X axis
    \draw[->, color=black] (0,-\Vs) -- (0,\Vs) node[anchor=south] {$i$}; %Y axis
    %\draw[help lines] (0,-\Vs) grid (9 ,\Vs); %Grid

    %X Axis tick marks
    \foreach \x in {1, 2,...,8} {
        \pgfmathsetmacro \tick {\x * 45};
        \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {\small\pgfmathprintnumber[fixed, precision=10]{\tick}$^{\circ}$};
        }

    %Marker to illustrate angle position over wave forms
    \draw[color=black] (\Marker cm, \Vs cm) -- (\Marker cm, -\Vs cm) node[anchor=north,align=center]{Current \\ position: \\ $\Angle^{\circ}$}; 

    %Top and bottom border, extending to circle top and and bottom
    \draw[color=gray] (\OrigoX,\Vs) -- (9,\Vs) ; %X axis TOP outer
    \draw[color=gray] (\OrigoX,-\Vs) -- (9,-\Vs) ; %X axis bottom outer










    %=============================================================================================================
    %Alpha and Beta Phasors
    %=============================================================================================================

    %SPACE VECTOR %
    \draw[->,ultra thick,black] (origob) -- ++($(phase_a) + (phase_b) + (phase_c)$) coordinate(Vstipb); %Space vector resultant
    \pgfgetlastxy{\XCoordb}{\YCoordb}; % X and Y coordinates of Space vector tip

    %Find space vector angle
    \pgfmathanglebetweenpoints{\pgfpointanchor{origob}{center}}{\pgfpointanchor{Vstipb}{center}}
    \let\PhaseBlackb\pgfmathresult;

    %Green Axis system rotated to rotor angle
    \draw[-,color=green] (\OrigoX,\OrigoYb-\Vs cm) -- ++(90:2*\Vs cm);
    \draw[-,color=green] (\OrigoX+\Vs cm,\OrigoYb)  -- ++(0:-2*\Vs cm);

    \draw[->,color=orange, thin, dashed] (\OrigoX, \YCoordb) -> (Vstipb); %Alpha help Line
    \draw[->,color=violet, thin, dashed] (\XCoordb, \OrigoYb) -> (Vstipb); %Beta help Line

    \draw[->,color=orange, very thick] (origob)  -- ++(0,\YCoordb-\OrigoYb) node[anchor=north east] {\large $i_\alpha$}; %Phase alpha phasor
    \draw[->,color=violet, very thick] (origob)  -- ++(\XCoordb-\OrigoX,0) node[anchor=north] {\large $i_\beta$}; %Phase beta phasor

    \coordinate (origobb) at (0,\OrigoYb); %Center of center phasor diagram
    \draw[color=orange,thick,smooth,domain=0:8, shift=(origobb)]  plot(\x,{\Vs * sin((\x*45)+90)}); % Alpha
    \draw[color=violet,thick,smooth,domain=0:8, shift=(origobb)]  plot(\x,{\Vs * sin((\x*45)+0)}); % Beta

    \draw[color=orange,dashed] (\Marker,\YCoordb)-- (-0.3,\YCoordb)  node[anchor=east] {$i_\alpha$};; %Alpha line to alpha-axis
    \draw[color=violet,dashed] (\Marker,\XCoordb-\OrigoX+\OrigoYb)-- (-0.3,\XCoordb-\OrigoX+\OrigoYb)  node[anchor=east] {$i_\beta$};; %Beta line to beta-axis

    %Wave form
    \draw[->, color=black] (0,\OrigoYb) -- (9,\OrigoYb) node[anchor=west] {$\theta$}; %X axis middle
    \draw[->, color=black] (0,\OrigoYb-\Vs cm) -- (0,\OrigoYb+\Vs cm) node[anchor=south] {$i$}; %Y axis middle
    \draw[help lines] (0,\OrigoYb-\Vs cm) grid (9 ,\OrigoYb+\Vs cm); %Grid middle

    %X Axis tick marks
    \foreach \x in {1, 2,...,8} {
        \pgfmathsetmacro \tick {\x * 45};
        \draw (\x cm,\OrigoYb-1pt) -- (\x cm,\OrigoYb+1pt) node[anchor=north] {\small\pgfmathprintnumber[fixed, precision=10]{\tick}$^{\circ}$};
        }

    %Marker to illustrate angle position over wave forms
    \draw[color=black] (\Marker cm,\OrigoYb+\Vs cm) -- (\Marker cm, \OrigoYb-\Vs cm) node[anchor=north,align=center]{Current \\ position: \\ $\Angle^{\circ}$}; 

    %Top and bottom border, extending to circle top and and bottom
    \draw[color=gray] (\OrigoX,\OrigoYb+\Vs cm) -- (9,\OrigoYb+\Vs cm) ; %X axis TOP outer
    \draw[color=gray] (\OrigoX,\OrigoYb-\Vs cm) -- (9,\OrigoYb-\Vs cm) ; %X axis bottom outer









    %=============================================================================================================
    %%D and Q Phasors%
    %=============================================================================================================

    %Space Vector
    \draw[->,ultra thick,black] (origoc) -- ++($(phase_a) + (phase_b) + (phase_c)$) coordinate(Vstipc); %Space vector resultant
    \pgfgetlastxy{\XCoordc}{\YCoordc}; % X and Y coordinates of Space vector tip

    %Find space vector angle
    \pgfmathanglebetweenpoints{\pgfpointanchor{origoc}{center}}{\pgfpointanchor{Vstipc}{center}}
    \let\PhaseBlackc\pgfmathresult;

    \coordinate (d1c) at (\PhaseBlackc-\Osv:\Vs cm) ; %Tip of d axis
    \coordinate (d2c) at (\PhaseBlackc-\Osv:-\Vs cm) ; %Tip of d axis
    \coordinate (q1c) at (\PhaseBlackc-\Osv+90:\Vs cm) ; %Tip of q axis
    \coordinate (q2c) at (\PhaseBlackc-\Osv+90:-\Vs cm) ; %Tip of q axis

    \coordinate (d3c) at (\PhaseBlackc-\Osv+90:\Qmag) ; %Tip of d 
    \coordinate (q3c) at (\PhaseBlackc-\Osv:\Dmag) ; %Tip of q 

    \draw[->,color=orange, thin, dashed] (origoc)  -- ++(d3c) -> (Vstipc); %Q help Line
    \draw[->,color=violet, thin, dashed] (origoc)  -- ++(q3c) -> (Vstipc); %Q help Line

    \draw[-,color=green, thin] (origoc)  -- ++(d1c); %D axis help line
    \draw[-,color=green, thin] (origoc)  -- ++(d2c); %D axis help line
    \draw[-,color=green, thin] (origoc)  -- ++(q1c); %Q axis help line
    \draw[-,color=green, thin] (origoc)  -- ++(q2c); %Q axis help line

    \draw[->,color=orange, very thick] (origoc)  -- ++(d3c) node[anchor=north east] {\large $i_q$}; %D phasor
    \draw[->,color=violet, very thick] (origoc)  -- ++(q3c) node[anchor=north] {\large $i_d$}; %Q phasor

    \coordinate (origocc) at (0,\OrigoYc); %Center of center phasor diagram
    \draw[color=orange,thick,,smooth,domain=0:8, shift=(origocc)] plot(\x,{\Qmag}); % Q
    \draw[color=violet,thick,,smooth,domain=0:8, shift=(origocc)] plot(\x,{\Dmag}); % D

    \draw[color=orange,dashed] (0,\OrigoYc+\Qmag cm)-- (-0.3,\OrigoYc+\Qmag cm)  node[anchor=east] {$i_q$}; %d line to y axis
    \draw[color=violet,dashed] (0,\OrigoYc+\Dmag cm)-- (-0.3,\OrigoYc+\Dmag cm)  node[anchor=east] {$i_d$}; %q line to y axis

    %% Rotor Flux Vector%
    \coordinate (rfluxtipc) at (\PhaseBlackc-\Osv:\R); %Tip of rotor flux
    \draw[->,color=gray] (origoc)  -- ++(rfluxtipc)  node[label={[label distance=-0.18cm]\PhaseBlack-\Osv: $\lambda_r$}] {}; %Bottom Rotor Flux Phasor




    %WAVE FORM%
    \draw[->, color=black] (0,\OrigoYc) -- (9,\OrigoYc) node[anchor=west] {$\theta$}; %X axis bottom
    \draw[->, color=black] (0,\OrigoYc-\Vs cm) -- (0,\OrigoYc+\Vs cm) node[anchor=south] {$i$}; %Y axis bottom
    \draw[help lines] (0,\OrigoYc-\Vs cm) grid (9 ,\OrigoYc+\Vs cm); %Grid middle

    %X Axis tick marks
    \foreach \x in {1, 2,...,8} {
        \pgfmathsetmacro \tick {\x * 45};
        \draw (\x cm,\OrigoYc-1pt) -- (\x cm,\OrigoYc+1pt) node[anchor=north] {\small\pgfmathprintnumber[fixed, precision=10]{\tick}$^{\circ}$};
        }

    %Marker to illustrate angle position over wave forms
    \draw[color=black] (\Marker cm,\OrigoYc+\Vs cm) -- (\Marker cm, \OrigoYc-\Vs cm) node[anchor=north,align=center]{Current \\ position: \\ $\Angle^{\circ}$}; 

    %Top and bottom border, extending to circle top and and bottom
    \draw[color=gray] (\OrigoX,\OrigoYc+\Vs cm) -- (9,\OrigoYc+\Vs cm) ; %X axis TOP outer
    \draw[color=gray] (\OrigoX,\OrigoYc-\Vs cm) -- (9,\OrigoYc-\Vs cm) ; %X axis bottom outer


    \end{tikzpicture}
    \stepcounter{angle}
    \ifthenelse{\theangle<359}{
            \newframe
    }{
            \end{animateinline}
    }
}
\end{center}
\end{frame}

%
%
\end{document}
  • It'd be helpful to know how you want the animation to go. Do you want the black arrows to rotate at all angles and the relevant graphs to change accordingly? – Alenanno Jun 27 '15 at 10:19
  • Ah, I'm sorry for being unclear. The variable "\Angle" is referring to the vertical line that "scans" over the wave forms on the right. But the black arrow (space vector resultant) is a direct result of this angle, so ultimately the black arrow will rotate as well. The other colored arrows will mostly move back and forth on their respective axes. – fluxmodel Jun 27 '15 at 10:26
  • You built the code in an unfamiliar way for me. Do you mind if I post an alternative code with the same result? – Alenanno Jun 27 '15 at 10:52
  • @Alenanno: I am sure I built the code in a very awkward and "heavyweight" type of way as I am very new with TikZ and LaTeX. If you would like to post a better/different code I would be very grateful as it probably would be very helpful to me :) – fluxmodel Jun 27 '15 at 11:02
  • It's not a bad code. It's just that it's very different to how I think. And as you may know, codes reflect one's thinking usually. :D – Alenanno Jun 27 '15 at 11:02
6

Before showing the results, some notes

  • This answer will only cover your first graph. Reason being that the code for it is already long and it took a while.

  • Also the first graph is incomplete. The blue and green arrows are missing, and I'm not sure if you wanted them to follow the intersection between the marker and the sin waves while being constrained in their own "paths" (the dashed lines inside the circle). I'll finish it once I'm sure of what you wanted there.

  • Let me know if I'm wrong, but 3 circles showing the various percentages were not mathematically correct. If I calculate the actual percentages their sizes differ from your example, and the polygon will not fit properly.
    Of course, if you don't care about that at all, I can re-fix it to be just cosmetic.

This answer consists of two documents:

  1. The Tikz animation in one document, let's call it "tikzanim".
  2. The Beamer document which will output the animation "on command". As in, you can advance the animation by clicking anywhere in the beamer frame. This can be changed in the options of course.

Here's a gif of me clicking the beamer frame (if you notice, I tend to stop at the 4 major angles, i.e. 360, 270, 180 and 90), and indeed, you can see my cursor. :D

Note: You need Adobe Reader to properly use beamer .pdf files.

Revision 2

.gif (beamer output)

(add loop to the options for looping it)

figure 1

Instructions

Create a new file named "tikzanim" (just an example) and paste this:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\usepackage{amsmath} 
\usetikzlibrary{calc, shapes.geometric, intersections}
\pgfplotsset{compat=1.9}

%\newcommand{\gettikzxy}[3]{%
%  \tikz@scan@one@point\pgfutil@firstofone#1\relax
%  \edef#2{\the\pgf@x}%
%  \edef#3{\the\pgf@y}%
%}

\begin{document}
\newcommand{\sside}{7}
\newcommand{\hundred}{3} % --> 100%
\pgfmathsetmacro \hunplus {(\hundred*115.47)/100} % --> 115,47%
\pgfmathsetmacro \hunpp {(\hundred*127.32)/100} % --> 127,32% 
\pgfmathsetmacro \Vmax {\hundred * 2/3}
%
\foreach \angle [count=\xi, evaluate=\angle as \mark using (15-(\xi/45)] in {360,...,1}{%
\begin{tikzpicture}

% Background and coordinates
\fill[white] (-12,-5) rectangle (18,5);
\coordinate (O) at (0,0);
\coordinate (ib) at (120:\hundred);

% Main circles and lines
\draw (0,0) circle (\hundred cm);
\draw[dashed, red] (0,0) circle (\hunplus cm); 
\draw (0,0) circle (\hunpp cm);
\foreach \sman in {45,90,...,360}{
    \node[font=\large] at (\sman:\hunpp*1.1 cm) {$\sman^\circ$};
    \draw[dotted] (0,0) -- (\sman:\hunpp);
}
\node[draw=black!50,thin,dashed, minimum size=\hunpp*2 cm, regular polygon, regular polygon sides=6] at (0,0) {};

% Nodes left side
\draw[dotted] (-\sside,\hundred) -- (0,\hundred) node[anchor=east, pos=0] {$I_{max}$};
\draw[dotted,red] (-\sside,\hunplus) -- (0,\hunplus) node[anchor=east,pos=0, text=red] {$\frac{2}{\sqrt{3}}I_{max} - 115,47\%$};
\draw[dotted] (-\sside,\hunpp) -- (0,\hunpp) node[anchor=east,pos=0] {$\frac{4}{\pi}I_{max} - 127,32\%$};
\draw[dotted] (-\sside,0) -- (\hunpp,0) node[anchor=east,pos=0] {$0\%$};
\draw[<->] ({-\sside+.5},-\hunpp cm) -- ({-\sside+.5},\hunpp*1.1 cm) node[anchor=south] {$I$};

% Vectors
\draw[red, dashed]   (0,0)  -- ++(0:\hundred cm)  node[anchor=west] {\large $i_a$};
\draw[green, dashed] (0,0)  -- ++(240:\hundred cm) node[anchor=north] {\large $i_c$};
\draw[red, dashed]   (0,0)  -- ++(0:-\hundred cm) node[anchor=east] {$-i_a$};
%\draw[blue, dashed]  (0,0) -- ++(120:-\hundred cm)  node[anchor=north] {$-i_b$}; % Yes, you can do this with one single command! See below!
\draw[name path=bib,blue, dashed] (300:\hundred) node[anchor=north] {$-i_b$} -- (120:\hundred) node[anchor=south] {\large $i_b$}; % Here!
\draw[green, dashed] (0,0)  -- ++(240:-\hundred cm) node[anchor=south] {$-i_c$};

% ---  Graph right side ---
\draw[gray] (0,\hunpp) -- ({\sside+10},\hunpp);
\draw[gray] (0,\hundred) -- ({\sside+10},\hundred);
\draw[gray] (0,-\hundred) -- ({\sside+10},-\hundred);
\draw[gray] (0,-\hunpp) -- ({\sside+10},-\hunpp);
\draw[->] (\sside,-\hunpp cm) -- (\sside,\hunpp) node[anchor=south] (i) {$i$};
\draw[->] (\sside,0) -- ({\sside+10},0) node[anchor=west] {$\theta$};

% Degrees
\foreach \n [count=\xi starting from 8] in {45,90,...,360}{
    \draw (\xi,.1) -- (\xi,-.1) node[below,anchor=north]{$\n^\circ$};
}

\draw[xshift=7cm,name path=red,red,thick,smooth,domain=0:8] plot(\x,{\hundred * sin(\x*45)}); % Phase A
\draw[xshift=7cm,name path=blue,blue,thick,smooth,domain=0:8] plot(\x,{\hundred * sin((\x*45)+120)}); %Phase B
\draw[xshift=7cm,name path=green,green,thick,smooth,domain=0:8] plot(\x,{\hundred * sin((\x*45)+240)}); % Phase C

% Marker
\draw[name path=mark] (\mark,-\hunpp cm) -- (\mark,\hunpp cm) node[anchor=north,pos=0,align=center] {Current \\ position: \\ $\angle^\circ$}; % 1.125
% Intersections
\node[coordinate, name intersections = {of = mark and blue}] (bmx) at (intersection-1) {};
\node[coordinate, name intersections = {of = green and mark}] (gmx) at (intersection-1) {};
%
%nodes indicating the intersection + dashed lines
\node[anchor=east, text=blue, xshift=-5mm] at (i|-bmx) (ibx) {$i_b$};
\node[anchor=east, text=green, xshift=-1cm] at (i|-gmx) (igx) {$i_b$};
\draw[blue, dashed] (bmx) -- (ibx);
\draw[green, dashed] (gmx) -- (igx);
%
%Black arrow
\draw[->, thick] (0,0) -- (\angle:\hunpp);
\end{tikzpicture}}
\end{document}

And then create another file (name is irrelevant, but place it in the same folder) and paste the following:

\documentclass{beamer} 
\usepackage{lmodern}
\usepackage{animate} 
\usetheme{Frankfurt}
\useoutertheme{infolines}

\begin{document} 
\begin{frame}
\begin{center} 
\animategraphics[controls, width=1\linewidth]{360}{tikzanim}{}{} 
\end{center} 
\end{frame}
\end{document} 
  • This is really nice work! There is one thing I do not understand though: In the first file, there is this line: \foreach \angle [count=\xi, evaluate=\angle as \mark using (15.1-(\xi/9)] in {360,355,...,5}. I suppose this creates each of the frames at 5 degree interval, but what is the purpose of \xi and \mark and (15.1...)? – fluxmodel Jun 29 '15 at 0:39
  • @fluxmodel count=\xi well, it counts 1 for each element in the foreach list. So 360 = 1, 355 = 2, and so on. I can change this by saying count=\xi starting from 34, for example. Anyway, the other calculation does this: 15 is the x coordinate of the "360" tick in the graph on the right side, so that's the starting point, then for each point it calculate that so: (15.1-(1/9)) where 15.1 is the starting point (plus .1 so it starts from the exact point), minus 1/9 (9 parts of a centimetre), because each tick on the right graph is a cm away from the other. – Alenanno Jun 29 '15 at 8:18
  • Ok. that sounds a little complicated. Is it possible to simplify this to generate 360 frames of the original code (pastebin.com/65Wq4xBu)? Cause here all the angles etc are already calculated, using only the variable on line24 – fluxmodel Jun 29 '15 at 8:54
  • @fluxmodel 360 frames? Yes, the calculation will be even simpler but... the file will be bigger. :P – Alenanno Jun 29 '15 at 9:03
  • 360 would be the best, but every fifth frame (72 frames) would also work. At least for testing :) – fluxmodel Jun 29 '15 at 9:43
2

I have (finally) solved this with a LOT of assistance from Alenanno. Thank you!

First, I render 360 frames in one file, then another .tex-file creates the animation.
It works as perfect as I ever wanted it to.

Now for the code(s):

File 1 - Create graphics and frames

The graphics are created here, where the variable is called \angle. I have created 360 frames, ergo a 360 page pdf document. All with a slightly different angle.

\documentclass[tikz,border=10pt]{standalone}
\usepackage{ifthen}
\usepackage{pgfplots}
\usepackage{amsmath} % Required for \varPsi below
\usepackage{tikz}
\usepackage{animate}
\usetikzlibrary{calc}
\pgfplotsset{compat=1.9}

\newcommand{\gettikzxy}[3]{%
  \tikz@scan@one@point\pgfutil@firstofone#1\relax
  \edef#2{\the\pgf@x}%
  \edef#3{\the\pgf@y}%
}

\begin{document}
\foreach \angle in {1,2,...,360}{ %Create all the frames 

    \begin{tikzpicture}


    %Definitions - These can be changed to create new figures%
    %===========================================================
    \def \Vs {4}; %Magnitude of space vector in cm
    \def \Angle {\angle}; %Angle with regards to phase A
    \def \Osv {35}; %Angle of d-axis wrt space vector
    \def \R {2.5}; %Magnitude of rotor flux in cm



    %Calculated variables. These should not be changed unless you know what you are doing%
    %===========================================================
    \pgfmathsetmacro \MaxLin {\Vs * cos{30}}; %Magnitude before overmodulation
    \pgfmathsetmacro \Qmag {\Vs * sin{\Osv})}; %Magnitude of Q axis
    \pgfmathsetmacro \Dmag {\Vs * cos{\Osv})}; %Magnitude of Q axis
    \pgfmathsetmacro \Marker {\Angle/45)};
    \pgfmathsetmacro \Vmax {\Vs * 2/3}; %Max phase voltage
    \def \Axisheight {\Vmax *3};
    \pgfmathsetmacro \Va {\Vmax * sin{(\Angle+0)}}; %Magnitude of phase A at angle \Angle
    \pgfmathsetmacro \Vb {\Vmax * sin{(\Angle+120)}}; %Magnitude of phase B at angle \Angle
    \pgfmathsetmacro \Vc {\Vmax * sin{(\Angle+240)}}; %Magnitude of phase C at angle \Angle
    \pgfmathsetmacro \Radius {\Vmax}; %Radius of maximum line to line voltage output


    %Locations%
    %===========================================================
    \def \OrigoX {-6 cm}; % If you want to move the circle relative to the wave forms (default -5cm)
    \def \OrigoY {0 cm};
    \def \OrigoYb {-12 cm};
    \def \OrigoYc {-24 cm};
    \coordinate (origo) at (\OrigoX,\OrigoY); %Center of top phasor diagram
    \coordinate (origob) at (\OrigoX,\OrigoYb); %Center of center phasor diagram
    \coordinate (origoc) at (\OrigoX,\OrigoYc); %Center of bottom phasor diagram
    \coordinate (phase_a) at (0:\Va cm); %Tip of phase A
    \coordinate (phase_b) at (120:\Vb cm); %Tip of phase B
    \coordinate (phase_c) at (240:\Vc cm) ; %Tip of phase C
    \coordinate (Y) at (\OrigoX+\Vs cm ,\OrigoY+0); %Where to start the Hexagon


    %Circle background rings%
    %===========================================================
    \node at (origo) [circle,thick,draw=black!80,fill=red!0, inner sep=0pt,minimum size=\Vs*2 cm] {}; %Top Circle with radius 128% 
    \node at (origob) [circle,thick,draw=black!80,fill=red!0, inner sep=0pt,minimum size=\Vs*2 cm] {}; %Center Circle with radius 128% 
    \node at (origoc) [circle,thick,draw=black!80,fill=red!0, inner sep=0pt,minimum size=\Vs*2 cm] {}; %Center Circle with radius 128% 

    %Left axis to top circle
    \draw[<->] (2.05*\OrigoX,-1.1*\Vs cm) -- (2.05*\OrigoX,1.1*\Vs cm) node[anchor=south, distance=0.2cm]{$I$};
    \draw [color=black,dotted](\OrigoX,\Vs cm)--(2.1*\OrigoX,\Vs cm) node[anchor=east, distance=0.5cm] {$\frac{4}{\pi}I_{max} - 127,32\%$};
    \draw [color=red,dotted] (\OrigoX,\MaxLin cm) -- (2.1*\OrigoX,\MaxLin cm) node[anchor=east, distance=0.5cm] {$\frac{2}{\sqrt{3}}I_{max} - 115,47\%$};
    \draw [color=black,dotted](\OrigoX,\Vmax cm) -- (2.1*\OrigoX,\Vmax cm) node[anchor=east] {$I_{max} - 100,00\%$};
    \draw [color=black,dotted](\OrigoX,0 cm) -- (2.1*\OrigoX,0 cm) node[anchor=east] {$0\%$};


    %Hexagon Framing around phasors%
    %===========================================================
    \draw[-, color=black!50,thin,dashed] (Y) -- ++(120:\Vs cm) -- ++(180:\Vs cm) -- ++(240:\Vs cm) -- ++(300:\Vs cm) -- ++(360:\Vs cm) -- ++(60:\Vs cm); % Six step hexagon
    \node at (origo) [circle,draw=red!80, inner sep=0pt,minimum size=\MaxLin*2 cm, dashed] {}; %Circle with radius 115% 



    %Black guide lines with angle notation
    \foreach \x in {45,90,...,360} {
        \draw[-,color=black,dotted, thin] (origo)  -- ++(\x:\Vs cm) node[label={[label distance=-0.18cm]\x: $\x^{\circ}$}] {};
    } \foreach \x in {45,90,...,360} {
        \draw[-,color=black,dotted, thin] (origob)  -- ++(\x:\Vs cm) node[label={[label distance=-0.18cm]\x: $\x^{\circ}$}] {};
    } \foreach \x in {45,90,...,360} {
        \draw[-,color=black,dotted, thin] (origoc)  -- ++(\x:\Vs cm) node[label={[label distance=-0.18cm]\x: $\x^{\circ}$}] {};
    } 





    %=============================================================================================================
    %Actual three phase phasors%
    %=============================================================================================================
    \node at (origo) [circle,thick,draw=black!80, inner sep=0pt,minimum size=\Vmax*2 cm] {}; %Circle with radius 100%
    \draw[->,color=red, very thick] (origo)  -- ++(phase_a); %Phase A phasor
    \draw[->,color=blue, very thick] (origo)  -- ++(phase_b); %Phase B phasor
    \draw[->,color=green, very thick] (origo)  -- ++(phase_c); %Phase C phasor

    \draw[color=red,thick,smooth,domain=0:8] plot(\x,{\Vmax * sin(\x*45)}); % Phase A
    \draw[color=blue,thick,,smooth,domain=0:8] plot(\x,{\Vmax * sin((\x*45)+120)}); %Phase B
    \draw[color=green,thick,,smooth,domain=0:8] plot(\x,{\Vmax * sin((\x*45)+240)}); % Phase C

    \draw[color=red,dashed] (\Marker,\Va) -- (-0.3,\Va)  node[anchor=east] {$i_a$};; %A phase line to Y-axis
    \draw[color=blue,dashed] (\Marker,\Vb)-- (-0.3,\Vb)  node[anchor=east] {$i_b$};; %B phase line to Y-axis
    \draw[color=green,dashed] (\Marker,\Vc)-- (-0.3,\Vc)  node[anchor=east] {$i_c$};; %C phase line to Y-axis

    %SPACE VECTOR %
    \draw[->,ultra thick,black] (origo) -- ++($(phase_a) + (phase_b) + (phase_c)$) coordinate(Vstip); %Space vector resultant
    \pgfgetlastxy{\XCoord}{\YCoord}; % X and Y coordinates of Space vector tip

    %Find space vector angle
    \pgfmathanglebetweenpoints{\pgfpointanchor{origo}{center}}{\pgfpointanchor{Vstip}{center}}
    \let\PhaseBlack\pgfmathresult;

    %Phasor guide lines%
    \draw[-,color=red, dashed] (origo)  -- ++(0:\Vmax cm)  node[anchor=west] {\large $i_a$};
    \draw[-,color=blue, dashed] (origo) -- ++(120:\Vmax cm) node[anchor=south] {\large $i_b$};
    \draw[-,color=green, dashed] (origo)  -- ++(240:\Vmax cm) node[anchor=north] {\large $i_c$};

    \draw[-,color=red, dashed] (origo)  -- ++(0:-\Vmax cm) node[anchor=east] {$-i_a$};
    \draw[-,color=blue, dashed] (origo) -- ++(120:-\Vmax cm)  node[anchor=north] {$-i_b$};
    \draw[-,color=green, dashed] (origo)  -- ++(240:-\Vmax cm) node[anchor=south] {$-i_c$};

    \draw[->,color=blue, thin] (origo) ++(phase_a) -> ++(phase_b); %Resultant help lines
    \draw[->,color=green, thin] (origo) ++(phase_a) ++(phase_b) -> ++(phase_c); %Resultant help lines

    \draw[color=gray] (\OrigoX,\Vmax) -- (9,\Vmax) ; %X axis TOP inner
    \draw[color=gray] (\OrigoX,-\Vmax) -- (9,-\Vmax) ; %X axis bottom inner


    %% Rotor Flux Vector%
    %\coordinate (rfluxtip) at (\PhaseBlack-\Osv:\R); %Tip of rotor flux
    %\draw[->,color=gray] (origo)  -- ++(rfluxtip)  node[label={[label distance=-0.18cm]\PhaseBlack-\Osv: $\lambda_r$}] {}; %Rotor Flux Phasor


    %Wave form
    \draw[->, color=black] (0,0) -- (9,0) node[anchor=west] {$\theta$}; %X axis
    \draw[->, color=black] (0,-\Vs) -- (0,\Vs) node[anchor=south] {$i$}; %Y axis
    %\draw[help lines] (0,-\Vs) grid (9 ,\Vs); %Grid

    %X Axis tick marks
    \foreach \x in {1, 2,...,8} {
        \pgfmathsetmacro \tick {\x * 45};
        \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {\small\pgfmathprintnumber[fixed, precision=10]{\tick}$^{\circ}$};
        }

    %Marker to illustrate angle position over wave forms
    \draw[color=black] (\Marker cm, \Vs cm) -- (\Marker cm, -\Vs cm) node[anchor=north,align=center]{Current \\ position: \\ $\Angle^{\circ}$}; 

    %Top and bottom border, extending to circle top and and bottom
    \draw[color=gray] (\OrigoX,\Vs) -- (9,\Vs) ; %X axis TOP outer
    \draw[color=gray] (\OrigoX,-\Vs) -- (9,-\Vs) ; %X axis bottom outer










    %=============================================================================================================
    %Alpha and Beta Phasors
    %=============================================================================================================

    %SPACE VECTOR %
    \draw[->,ultra thick,black] (origob) -- ++($(phase_a) + (phase_b) + (phase_c)$) coordinate(Vstipb); %Space vector resultant
    \pgfgetlastxy{\XCoordb}{\YCoordb}; % X and Y coordinates of Space vector tip

    %Find space vector angle
    \pgfmathanglebetweenpoints{\pgfpointanchor{origob}{center}}{\pgfpointanchor{Vstipb}{center}}
    \let\PhaseBlackb\pgfmathresult;

    %Green Axis system rotated to rotor angle
    \draw[-,color=green] (\OrigoX,\OrigoYb-\Vs cm) -- ++(90:2*\Vs cm);
    \draw[-,color=green] (\OrigoX+\Vs cm,\OrigoYb)  -- ++(0:-2*\Vs cm);

    \draw[->,color=orange, thin, dashed] (\OrigoX, \YCoordb) -> (Vstipb); %Alpha help Line
    \draw[->,color=violet, thin, dashed] (\XCoordb, \OrigoYb) -> (Vstipb); %Beta help Line

    \draw[->,color=orange, very thick] (origob)  -- ++(0,\YCoordb-\OrigoYb) node[anchor=north east] {\large $i_\alpha$}; %Phase alpha phasor
    \draw[->,color=violet, very thick] (origob)  -- ++(\XCoordb-\OrigoX,0) node[anchor=north] {\large $i_\beta$}; %Phase beta phasor

    \coordinate (origobb) at (0,\OrigoYb); %Center of center phasor diagram
    \draw[color=orange,thick,smooth,domain=0:8, shift=(origobb)]  plot(\x,{\Vs * sin((\x*45)+90)}); % Alpha
    \draw[color=violet,thick,smooth,domain=0:8, shift=(origobb)]  plot(\x,{\Vs * sin((\x*45)+0)}); % Beta

    \draw[color=orange,dashed] (\Marker,\YCoordb)-- (-0.3,\YCoordb)  node[anchor=east] {$i_\alpha$};; %Alpha line to alpha-axis
    \draw[color=violet,dashed] (\Marker,\XCoordb-\OrigoX+\OrigoYb)-- (-0.3,\XCoordb-\OrigoX+\OrigoYb)  node[anchor=east] {$i_\beta$};; %Beta line to beta-axis

    %Wave form
    \draw[->, color=black] (0,\OrigoYb) -- (9,\OrigoYb) node[anchor=west] {$\theta$}; %X axis middle
    \draw[->, color=black] (0,\OrigoYb-\Vs cm) -- (0,\OrigoYb+\Vs cm) node[anchor=south] {$i$}; %Y axis middle
    \draw[help lines] (0,\OrigoYb-\Vs cm) grid (9 ,\OrigoYb+\Vs cm); %Grid middle

    %X Axis tick marks
    \foreach \x in {1, 2,...,8} {
        \pgfmathsetmacro \tick {\x * 45};
        \draw (\x cm,\OrigoYb-1pt) -- (\x cm,\OrigoYb+1pt) node[anchor=north] {\small\pgfmathprintnumber[fixed, precision=10]{\tick}$^{\circ}$};
        }

    %Marker to illustrate angle position over wave forms
    \draw[color=black] (\Marker cm,\OrigoYb+\Vs cm) -- (\Marker cm, \OrigoYb-\Vs cm) node[anchor=north,align=center]{Current \\ position: \\ $\Angle^{\circ}$}; 

    %Top and bottom border, extending to circle top and and bottom
    \draw[color=gray] (\OrigoX,\OrigoYb+\Vs cm) -- (9,\OrigoYb+\Vs cm) ; %X axis TOP outer
    \draw[color=gray] (\OrigoX,\OrigoYb-\Vs cm) -- (9,\OrigoYb-\Vs cm) ; %X axis bottom outer









    %=============================================================================================================
    %%D and Q Phasors%
    %=============================================================================================================

    %Space Vector
    \draw[->,ultra thick,black] (origoc) -- ++($(phase_a) + (phase_b) + (phase_c)$) coordinate(Vstipc); %Space vector resultant
    \pgfgetlastxy{\XCoordc}{\YCoordc}; % X and Y coordinates of Space vector tip

    %Find space vector angle
    \pgfmathanglebetweenpoints{\pgfpointanchor{origoc}{center}}{\pgfpointanchor{Vstipc}{center}}
    \let\PhaseBlackc\pgfmathresult;

    \coordinate (d1c) at (\PhaseBlackc-\Osv:\Vs cm) ; %Tip of d axis
    \coordinate (d2c) at (\PhaseBlackc-\Osv:-\Vs cm) ; %Tip of d axis
    \coordinate (q1c) at (\PhaseBlackc-\Osv+90:\Vs cm) ; %Tip of q axis
    \coordinate (q2c) at (\PhaseBlackc-\Osv+90:-\Vs cm) ; %Tip of q axis

    \coordinate (d3c) at (\PhaseBlackc-\Osv+90:\Qmag) ; %Tip of d 
    \coordinate (q3c) at (\PhaseBlackc-\Osv:\Dmag) ; %Tip of q 

    \draw[->,color=orange, thin, dashed] (origoc)  -- ++(d3c) -> (Vstipc); %Q help Line
    \draw[->,color=violet, thin, dashed] (origoc)  -- ++(q3c) -> (Vstipc); %Q help Line

    \draw[-,color=green, thin] (origoc)  -- ++(d1c); %D axis help line
    \draw[-,color=green, thin] (origoc)  -- ++(d2c); %D axis help line
    \draw[-,color=green, thin] (origoc)  -- ++(q1c); %Q axis help line
    \draw[-,color=green, thin] (origoc)  -- ++(q2c); %Q axis help line

    \draw[->,color=orange, very thick] (origoc)  -- ++(d3c) node[anchor=north east] {\large $i_q$}; %D phasor
    \draw[->,color=violet, very thick] (origoc)  -- ++(q3c) node[anchor=north] {\large $i_d$}; %Q phasor

    \coordinate (origocc) at (0,\OrigoYc); %Center of center phasor diagram
    \draw[color=orange,thick,,smooth,domain=0:8, shift=(origocc)] plot(\x,{\Qmag}); % Q
    \draw[color=violet,thick,,smooth,domain=0:8, shift=(origocc)] plot(\x,{\Dmag}); % D

    \draw[color=orange,dashed] (0,\OrigoYc+\Qmag cm)-- (-0.3,\OrigoYc+\Qmag cm)  node[anchor=east] {$i_q$}; %d line to y axis
    \draw[color=violet,dashed] (0,\OrigoYc+\Dmag cm)-- (-0.3,\OrigoYc+\Dmag cm)  node[anchor=east] {$i_d$}; %q line to y axis

    %% Rotor Flux Vector%
    \coordinate (rfluxtipc) at (\PhaseBlackc-\Osv:\R); %Tip of rotor flux
    \draw[->,color=gray] (origoc)  -- ++(rfluxtipc)  node[label={[label distance=-0.18cm]\PhaseBlack-\Osv: $\lambda_r$}] {}; %Bottom Rotor Flux Phasor




    %WAVE FORM%
    \draw[->, color=black] (0,\OrigoYc) -- (9,\OrigoYc) node[anchor=west] {$\theta$}; %X axis bottom
    \draw[->, color=black] (0,\OrigoYc-\Vs cm) -- (0,\OrigoYc+\Vs cm) node[anchor=south] {$i$}; %Y axis bottom
    \draw[help lines] (0,\OrigoYc-\Vs cm) grid (9 ,\OrigoYc+\Vs cm); %Grid middle

    %X Axis tick marks
    \foreach \x in {1, 2,...,8} {
        \pgfmathsetmacro \tick {\x * 45};
        \draw (\x cm,\OrigoYc-1pt) -- (\x cm,\OrigoYc+1pt) node[anchor=north] {\small\pgfmathprintnumber[fixed, precision=10]{\tick}$^{\circ}$};
        }

    %Marker to illustrate angle position over wave forms
    \draw[color=black] (\Marker cm,\OrigoYc+\Vs cm) -- (\Marker cm, \OrigoYc-\Vs cm) node[anchor=north,align=center]{Current \\ position: \\ $\Angle^{\circ}$}; 

    %Top and bottom border, extending to circle top and and bottom
    \draw[color=gray] (\OrigoX,\OrigoYc+\Vs cm) -- (9,\OrigoYc+\Vs cm) ; %X axis TOP outer
    \draw[color=gray] (\OrigoX,\OrigoYc-\Vs cm) -- (9,\OrigoYc-\Vs cm) ; %X axis bottom outer


    \end{tikzpicture}
}
\end{document}

File 2 - Creates animation

This file creates the animation of the already rendered frames (called "frames") and is a file residing in the same folder.

\documentclass{standalone} 
\usepackage{animate} 

\begin{document} 
\animategraphics[controls,autoplay,loop]{72}{frames}{}{} %Create animation of the output file with all the frames
\end{document} 

Results:

Still picture of the rendered result: Still picture of the rendered result:

And the animation. This is 15 fps, but the animation which the GIF-software tried to record was 45 fps, so the real PDF is more smooth. Also, the PDF contains all 360 degrees. Dont know what happened with the first 90 in the GIF :) Animated Result

Notes:

Expect some rendering time (5-20 minutes depending on hardware).
If you want to test this on your own system, I recommend reducing the number of frames to e.g. 5 before moving on to the whole 360. You can of course also render 1,5,10,360 to reduce the rendering time and file size.

  • Is it possible to render all 360 frames as a 360-page standalone class? And then use LaTeX or an external program to create an animation out of that? – fluxmodel Jun 29 '15 at 4:57
  • In your tikz file, you need to increase size of the white rectangle that works as a background :) Although my suggestion would be to use one graph per frame in beamer if possible. 3 Graphs mean you must resize them to fit, so they'd be too small. – Alenanno Jun 29 '15 at 8:20
  • Can one beamer "slide" be the same size as the auto-sized canvas in my original question? (which was a standalone document). It is important that all three curves are in one page as they need to be looked at simultanously :) – fluxmodel Jun 29 '15 at 8:48
  • Yes, see this answer. But also do this: in your tikz file increase the size of the white rectangle so that it covers all of the graphs, at the beginning I added a %background comment. Increase that white rectangle's size. – Alenanno Jun 29 '15 at 8:54
  • I have increased the rectangle size and rendered 360 slides now. The problem is that the rectangle extends beyond the slide, so that it is not possible to see the entire slide unless you enable "one slide at the time"-view and zoom out. So the actual slide needs to be extended. BUT, that being said, the animation works perfectly. So it is just a matter of this slide-stuff until we are goal. – fluxmodel Jun 29 '15 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.