SmtC: Show me the Code
Ole Peter Smith
Instituto de Matemática e Estatística
Universidade Federal de Goiás
http://www.olesmith.com.br

tikzanim.py
  • Trochoid Evolute*
Quando eu dou de comer aos pobres
Me chamam de santo
Quando eu pergunto por que eles são pobres
Me chamam de comunista
Dom Helder Câmera
< tikz2pdf.py | Trochoid Evolute | Animation >

Taylor's Formula for Planar Curvas, n=2

r(t)r(t0)+(tt0)r(t0)+12(tt0)2r(t0)
TiKZ Listing: Fig.tikz.tex. PDF   PNG   SVG   ZIP*  
\documentclass[]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{calc} 
\pgfplotsset{compat=1.14} 

\usepackage{xcolor}

%Radius of rolling circle
\tikzmath{\r=1;}
   
%Number of curves to draw.
\tikzmath{\N=1;}
   
%Relative position of rollong point. Lambda=\pm 1: cycloid
\tikzmath{\LambdaMin=2.0;}
\tikzmath{\LambdaMax=2.0;}

%Steps of aLambda
\tikzmath{\dLambda=(\LambdaMax-\LambdaMin)/\N;}
  
%Variation of colors - color in [0,100].
\tikzmath{\dcolor=100/\N;}

%Fixed time - draw rolling
\tikzmath{\T=4/3;}

%Epsilon (not too small!)
\tikzmath{\Eps=1;}


\input{Curve.Styles.tikz}
\input{Curve.tikz}
\input{PQ.tikz}
\input{Rolling.tikz}

\input{Trochoid.tikz}
\input{Trochoid.Rolling.tikz}

\begin{document}
   %Multiply \T with pi, \T is t_0
   \tikzmath{\T=pi*\T;}
   %Second parametervalue, t
   \tikzmath{\TT=\T+\Eps;}

   
   \begin{tikzpicture}
   \begin{scope}   
       \clip (-\r-1,-2*\r) rectangle (5*pi,6*\r);
       \foreach \n in {0,1,...,\N}
       {
           %\Lambda and color, \color
           \tikzmath{\Lambda=\LambdaMin+\n*\dLambda;}
           \tikzmath{\col=\n*\dcolor;}
          
           \DrawCurve{\Lambda}{color=blue!\col!cyan,thin} 
       }
       
       %Draw cycloid
       \tikzmath{\Lambda=1;}
       \DrawCurve{\Lambda}{color=blue,thick}
       \DrawRolling{\T}
       
       \CalcR{\Lambda}{\T}
       \filldraw[rolling] (R) circle(1pt);
       \draw[rolling,-latex] (Rolling) -- (R);
            
       \CalcR{\LambdaMax}{\T}
       
       \coordinate (Frenet) at (0,0);
       \DrawFrenet{\LambdaMax}{\T}{(Frenet)}
       
       \filldraw[curves] (R) circle(1pt) node[right] {$t_0$};
      
       %Tangent      
       \CalcDr{\LambdaMax}{\T}
       %\draw[-latex,curves] (R)-- +(dR);
       
       \DrawTaylorII{\LambdaMax}{\T}{\TT}
      
       %Coordinate system
       \draw[-latex]
          (-\r,0) 
          --
          (4*pi+0.5*\r*\LambdaMax,0) node [right]
          {$x$};
       \draw[-latex]
          (0,-\r)
          --
          (0,1.5*\r*\LambdaMax)
          node [above] {$y$};
              
   \end{scope}   
   \end{tikzpicture}
\end{document}
2_Palestras/2020/04_Scripting/09_tikzanim.py/01_Trochoid/Images/Fig-003.svg
< tikz2pdf.py | Trochoid Evolute | Animation >
Messages:
0 secs.