Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
GuillaumeLaplante-Anfossi
GitHub Repository: GuillaumeLaplante-Anfossi/Poissons
Path: blob/main/Talk GDRIM/anim.tex
1016 views
1
\documentclass[tikz]{standalone}
2
\usepackage{tikz}
3
\begin{document}
4
\foreach \angle in {0,10,...,360}
5
{
6
\begin{tikzpicture}
7
% fill circle and plot
8
\fill[blue!50] (-1,0) arc (0:\angle:1) -- (-2,0) -- cycle;
9
\fill[blue!50] plot[smooth,domain=0:\angle] (pi/180*\x,{sin(\x)}) |- (0,0);
10
% draw connection
11
\draw (-2,0) +(\angle:1) circle (2pt) -- (pi/180*\angle,{sin(\angle)}) circle (2pt);
12
% draw axes an ticks
13
\draw (-3.5,0) -- (7,0);
14
\foreach \deg in {90, 180, 270, 360}
15
\draw (pi/180*\deg,2pt) -- (pi/180*\deg,-2pt) node[below] {$\deg^\circ$};
16
\draw (0,-1.2) -- (0,1.2);
17
\foreach \y in {-1,-0.5,0.5,1}
18
\draw (2pt,\y) -- (-2pt,\y) node[left] {$\y$};
19
% draw plot and circle outline
20
\draw plot[smooth,domain=0:360] (pi/180*\x,{sin(\x)});
21
\draw (-2,0) circle (1);
22
\end{tikzpicture}
23
}
24
\end{document}
25
26
%convert -density 300 -delay 8 -loop 0 -background white -alpha remove anim.pdf anim.gif
27