Consider the following MWE:
\documentclass[tikz]{standalone}
\usetikzlibrary{backgrounds}
\definecolor{filz}{RGB}{56,114,73}
%\pagecolor{filz}
\newcommand{\roulette}[1]{
% \pgfmathsetseed{3}
\pgfmathsetmacro\random{10*random(0,36)}
\foreach \n in {0,10,...,\random}
% \foreach \n in {\random,...,\random}
{
\begin{tikzpicture}
\useasboundingbox (-.5,-.75) rectangle (3.5,2.75);
\begin{scope}[scale=.25,shift={(-2,10)}]
\foreach \x in {1,...,3}
\foreach \y in {1,...,12}
{
\pgfmathsetmacro\number{int(\x+3*(\y-1))}
\pgfmathsetmacro\testnumber{int(mod(\number,2))}
\ifnum\testnumber=0
\node[scale=.25,text=white,fill=red,minimum height=1.01cm,minimum width=1.01cm] at (\x,-\y) {\Huge\number};
\else
\node[scale=.25,text=white,fill,minimum height=1.01cm,minimum width=1.01cm] at (\x,-\y) {\Huge\number};
\fi
}
\node[scale=.25,text=white,fill=red,minimum height=1.01cm,minimum width=3.01cm] at (2,0) {\Huge 0};
\pgfmathsetmacro\testing{#1}
\pgfmathsetmacro\secure{int(mod(int(\testing),3))}
\ifnum\secure=0
\pgfmathsetmacro\xpos{mod(\testing,3)+3}
\pgfmathsetmacro\ypos{-int(\testing/3)}
\else
\pgfmathsetmacro\xpos{mod(\testing,3)}
\pgfmathsetmacro\ypos{-int(\testing/3)-1}
\fi
\ifnum#1>0
\pgfmathsetmacro\anothertest{int(mod(#1,2))}
\ifnum\anothertest=0
\draw[black,thick,fill=red] (\xpos,\ypos) circle(.2);
\else
\draw[red,thick,fill=black] (\xpos,\ypos) circle(.2);
\fi
\else
\draw[black,thick,fill=red] (1,0) circle(.2);
\fi
\end{scope}
\begin{scope}[shift={(2,1)}]
\foreach[count=\xx] \x in {0,20,...,340}
{
\fill[red] (\x:1) arc(\x:\x+10:1) -- (\x+10:.75) arc(\x+10:\x:.75) -- cycle;
\fill[rotate=10] (\x:1) arc(\x:\x+10:1) -- (\x+10:.75) arc(\x+10:\x:.75) -- cycle;
\draw[fill=white] (\x:1) arc(\x:\x+10:1) -- (\x+10:1.25) arc(\x+10:\x:1.25) -- cycle;
\draw[fill=white,rotate=10] (\x:1) arc(\x:\x+10:1) -- (\x+10:1.25) arc(\x+10:\x:1.25) -- cycle;
\pgfmathsetmacro\nn{int(2*(\xx-1))}
\pgfmathsetmacro\nnn{int(2*\xx-1)}
\node[red,rotate=\x,scale=.5] at (\x+5:1.1) {\nn};
\node[scale=.5,rotate=\x+15] at (\x+15:1.1) {\nnn};
}
\fill[ball color=white] (\n+5:{1-.05-(((1-2*.05)-.75)/2)}) circle(.05);
\end{scope}
\begin{pgfonlayer}{background}
\fill[filz] (current bounding box.south west) rectangle (current bounding box.north east);
\end{pgfonlayer}
\end{tikzpicture}
}
}
\begin{document}
\roulette{0}
\end{document}
Here is the output:
I know, that the numbers are not in the right order and that there is one number missing, but it's not important. My question is:
How can I achieve, that the roulette slice is rotating clockwise, while the ball is rotating counter-clockwise to the slice and that the both stop rotating, when the ball falls into a cell. The rotating should be just like in real life, i.e. the rotation is at the beginning faster than at the end.


