Registerfahrrad


		dvilualatex registerfahrrad.tex
		dvisvgm --font-format=woff --exact --zoom=-1 registerfahrrad.dvi
	

\documentclass[10pt,dvisvgm]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{animate}

\usepackage{tikz}
\usepackage{tikz-layers}
\usetikzlibrary{patterns,calc,matrix,fit}
\usetikzlibrary{positioning,shapes,shapes.misc,shapes.multipart}
\usetikzlibrary{decorations.pathreplacing,arrows.meta}
\usetikzlibrary{snakes}
\usetikzlibrary{shadows}
\pagestyle{empty}

\definecolor{Orange}{rgb}{0.96,0.47,0.00}
\definecolor{ScarletRed}{rgb}{0.80,0.00,0.00}
\definecolor{indigo}{RGB}{114,  33, 188}
\definecolor{aluminium3}{RGB}{186, 189, 182}
\definecolor{SkyBlue}{rgb}{0.20,0.39,0.64}
\definecolor{turquoise}{RGB}{ 64, 224, 208}
\definecolor{Chameleon}{rgb}{0.45,0.82,0.09}
\definecolor{Butter}{rgb}{0.93,0.86,0.25}
\definecolor{aluminium2}{RGB}{211, 215, 207}
\definecolor{aluminium4}{RGB}{136, 138, 133}

\def\centerarc[#1](#2)(#3:#4:#5) { \draw[#1] ($(#2)+({#5*cos(#3)},{#5*sin(#3)})$) arc (#3:#4:#5); }
\def\carc[#1](#2:#3:#4){ \centerarc[#1](0,0)(#2:#3:#4) }

\def\fahrrada[#1,#2,#3,#4]{
\begin{tikzpicture}[
	every path/.style={},
	every node/.style={font=\scriptsize},
	base/.style={draw, thick, align=center, text centered, minimum height=0.75cm, minimum width=1.5cm},
	Pattern/.style = { pattern=horizontal, hatch distance=4pt, hatch thickness = 3pt},
	]
	\registerradat[#1,#2,#3,#4,0,0]
	\registerradat[#1,#2,#3,#4,18,0]
	\draw[line width=5mm] (18,0) arc (220:180:10cm) node[](lenker){};
	\draw[line width=5mm] ($(lenker)+(0.1,0)$) -- ++(-11,0) node[](sattel){} -- (0,0) -- ++(7,-1) node[](pedal){} -- ($(lenker)+(0.1,0)$);
	\draw[line width=5mm] ($(pedal)+(-0.1,0.1)$) -- ($(sattel)+(-0.8,2)$);
	\draw[line width=5mm] (lenker) arc (180:50:2cm);
	\draw[line width=3mm] ($(pedal)+(0.8,2)$) -- ($(pedal)+(-0.8,-2)$);
	\draw[line width=3mm,color=aluminium4] ($(pedal)+(0.2,2)$) -- ($(pedal)+(1.4,2)$);
	\draw[line width=3mm,color=aluminium4] ($(pedal)+(-0.2,-2)$) -- ($(pedal)+(-1.4,-2)$);
	\path[fill] (18,0) circle(0.4cm);
	\path[fill,color=aluminium4] ($(sattel)+(-0.4,2.1)$) ellipse(1.5cm and 0.55cm);
	\path[fill,color=aluminium4] ($(sattel)+(-1.2,1.9)$) ellipse(1.5cm and 0.7cm);
	\draw[line width=3mm,color=aluminium2] (-5,-5.15) -- (23,-5.15);
\end{tikzpicture}
}

\def\fahrradb[#1,#2,#3,#4]{
	\begin{tikzpicture}[
	every path/.style={},
	every node/.style={font=\scriptsize},
	base/.style={draw, thick, align=center, text centered, minimum height=0.75cm, minimum width=1.5cm},
	Pattern/.style = { pattern=horizontal, hatch distance=4pt, hatch thickness = 3pt},
	]
	\registerradon[#1,#2,#3,#4,0,0]
	\registerradon[#1,#2,#3,#4,18,0]
	\draw[line width=5mm] (18,0) arc (220:180:10cm) node[](lenker){};
	\draw[line width=5mm] ($(lenker)+(0.1,0)$) -- ++(-11,0) node[](sattel){} -- (0,0) -- ++(7,-1) node[](pedal){} -- ($(lenker)+(0.1,0)$);
	\draw[line width=5mm] ($(pedal)+(-0.1,0.1)$) -- ($(sattel)+(-0.8,2)$);
	\draw[line width=5mm] (lenker) arc (180:50:2cm);
	\draw[line width=3mm] ($(pedal)+(0.8,2)$) -- ($(pedal)+(-0.8,-2)$);
	\draw[line width=3mm,color=aluminium4] ($(pedal)+(0.2,2)$) -- ($(pedal)+(1.4,2)$);
	\draw[line width=3mm,color=aluminium4] ($(pedal)+(-0.2,-2)$) -- ($(pedal)+(-1.4,-2)$);
	\path[fill] (18,0) circle(0.4cm);
	\path[fill,color=aluminium4] ($(sattel)+(-0.4,2.1)$) ellipse(1.5cm and 0.55cm);
	\path[fill,color=aluminium4] ($(sattel)+(-1.2,1.9)$) ellipse(1.5cm and 0.7cm);
	\draw[line width=3mm,color=aluminium2!70] (-5,-5.15) -- (23,-5.15);
	\end{tikzpicture}
}

\def\registerradon[#1,#2,#3,#4,#5,#6] {
	\begin{scope}[on above layer]
	\end{scope}
	\foreach \y in {2.5} {
		\centerarc[thick](#5,#6)(0:360:1.5*\y)
		\begin{scope}[on above layer]
		\foreach \x in {0,1,2,3} {
			\centerarc[thick](#5,#6)(-22.5+(90*\x):-22.5+3*22.5+(90*\x):\y)
			\centerarc[thick](#5,#6)(-22.5+2*22.5+(90*\x):-22.5+(22.5*5)+(90*\x):2*\y)
			\draw[thick] ($(#5,#6)+(0+\x*90:\y cm)$) -- ++(\x*90:\y cm);
			\draw[thick] ($(#5,#6)+(45+\x*90:\y cm)$) -- ++(45+\x*90:\y cm);
			\draw[thick,dashed] ($(#5,#6)+(22.5+\x*90:\y cm)$) -- ++(22.5+\x*90:\y cm);
			\draw[thick,dashed] ($(#5,#6)+(67.5+\x*90:\y cm)$) -- ++(67.5+\x*90:\y cm);
			\node[] at ($(#5,#6)+(12.5+\x*90:\y*1.25 cm)$) () {w%
				\pgfmathparse{mod(6+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} locals
			};
			\node[] at ($(#5,#6)+(12.5+22.5+\x*90:\y*1.25 cm)$) () {w%
				\pgfmathparse{mod(6+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} ins
			};
			\node[] at ($(#5,#6)+(12.5-22.5+\x*90:\y*1.25 cm)$) () {w%
				\pgfmathparse{mod(6+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} outs
			};
			\node[] at ($(#5,#6)+(12.5+22.5+\x*90:\y*1.75 cm)$) () {w%
				\pgfmathparse{mod(7+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} outs
			};
			\node[] at ($(#5,#6)+(12.5+2*22.5+\x*90:\y*1.75 cm)$) () {w%
				\pgfmathparse{mod(7+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} locals
			};
			\node[] at ($(#5,#6)+(12.5+3*22.5+\x*90:\y*1.75 cm)$) () {w%
				\pgfmathparse{mod(7+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} ins
			};
		}
		\end{scope}
		%registerrad filling
		\begin{scope}[on background layer]
			\path[fill, color=#2] ($(#5,#6)+(90+22.5+#1*2*22.5:\y *2 cm)$) arc
			(90+22.5+#1*2*22.5:90+4*22.5+#1*2*22.5:\y*2cm) --
			($(#5,#6)+(90+4*22.5+#1*2*22.5:\y cm)$) arc
			(90+4*22.5+#1*2*22.5:90+3*22.5+#1*2*22.5:\y cm) --
			($(#5,#6)+(90+3*22.5+#1*2*22.5:1.5*\y cm)$) arc
			(90+3*22.5+#1*2*22.5:90+2*22.5+#1*2*22.5:1.5*\y cm) --
			($(#5,#6)+(90+2*22.5+#1*2*22.5:\y cm)$) arc
			(90+2*22.5+#1*2*22.5:90+1*22.5+#1*2*22.5:\y cm) -- cycle;
			\path[fill, color=#3] ($(#5,#6)+(90-22.5+#1*2*22.5:\y *2 cm)$) arc
			(90-22.5+#1*2*22.5:90+#1*2*22.5:\y*2cm) -- ($(#5,#6)+(90+#1*2*22.5:1.5*\y cm)$) arc
			(90+#1*2*22.5:90+22.5+#1*2*22.5:1.5*\y cm) --($(#5,#6)+(90+22.5+#1*2*22.5:2*\y cm)$) arc
			(90+22.5+#1*2*22.5:90+2*22.5+#1*2*22.5:2*\y cm) -- ($(#5,#6)+(90+2*22.5+#1*2*22.5:\y cm)$) arc
			(90+2*22.5+#1*2*22.5:90-22.5+#1*2*22.5:\y cm) -- cycle;
			\path[preaction={fill=#2}, Pattern,hatch color=#3]
			($(#5,#6)+(90+22.5+#1*2*22.5:\y *2 cm)$) arc (90+22.5+#1*2*22.5:90+2*22.5+#1*2*22.5:\y*2cm)
			--($(#5,#6)+(90+2*22.5+#1*2*22.5:\y cm)$) arc (90+2*22.5+#1*2*22.5:90+22.5+#1*2*22.5:\y cm) --
			cycle;
		\end{scope}
		\begin{scope}[on background layer]
			\path[fill, color=#4] ($(#5,#6)+(90-22.5+#1*2*22.5:\y *2 cm)$) arc
			(90-22.5+#1*2*22.5:90-3*22.5+#1*2*22.5:\y*2cm) -- ($(#5,#6)+(90-3*22.5+#1*2*22.5:\y cm)$) arc
			(90-3*22.5+#1*2*22.5:90-2*22.5+#1*2*22.5:\y cm) --($(#5,#6)+(90-2*22.5+#1*2*22.5:1.5*\y cm)$) arc
			(90-2*22.5+#1*2*22.5:90-1*22.5+#1*2*22.5:1.5*\y cm) -- cycle;
			\path[preaction={fill=#4}, Pattern,hatch color=#3]
			($(#5,#6)+(90+#1*2*22.5:\y *2 cm)$) arc (90+#1*2*22.5:90-1*22.5+#1*2*22.5:\y*2cm)
			--($(#5,#6)+(90-1*22.5+#1*2*22.5:\y cm)$) arc (90-1*22.5+#1*2*22.5:90+#1*2*22.5:\y cm) --
			cycle;
		\end{scope}
	}
}

\def\registerradat[#1,#2,#3,#4,#5,#6] {
	\foreach \y in {2.5} {
		\centerarc[thick](#5,#6)(0:360:1.5*\y)
		\begin{scope}[on above layer]
		\foreach \x in {0,1,2,3} {
			\centerarc[thick](#5,#6)(-22.5+(90*\x):-22.5+3*22.5+(90*\x):\y)
			\centerarc[thick](#5,#6)(-22.5+2*22.5+(90*\x):-22.5+(22.5*5)+(90*\x):2*\y)
			\draw[thick] ($(#5,#6)+(0+\x*90:\y cm)$) -- ++(\x*90:\y cm);
			\draw[thick] ($(#5,#6)+(45+\x*90:\y cm)$) -- ++(45+\x*90:\y cm);
			\draw[thick,dashed] ($(#5,#6)+(22.5+\x*90:\y cm)$) -- ++(22.5+\x*90:\y cm);
			\draw[thick,dashed] ($(#5,#6)+(67.5+\x*90:\y cm)$) -- ++(67.5+\x*90:\y cm);
			\node[] at ($(#5,#6)+(12.5+\x*90:\y*1.25 cm)$) () {w%
				\pgfmathparse{mod(6+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} locals
			};
			\node[] at ($(#5,#6)+(12.5+22.5+\x*90:\y*1.25 cm)$) () {w%
				\pgfmathparse{mod(6+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} ins
			};
			\node[] at ($(#5,#6)+(12.5-22.5+\x*90:\y*1.25 cm)$) () {w%
				\pgfmathparse{mod(6+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} outs
			};
			\node[] at ($(#5,#6)+(12.5+22.5+\x*90:\y*1.75 cm)$) () {w%
				\pgfmathparse{mod(7+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} outs
			};
			\node[] at ($(#5,#6)+(12.5+2*22.5+\x*90:\y*1.75 cm)$) () {w%
				\pgfmathparse{mod(7+0+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} locals
			};
			\node[] at ($(#5,#6)+(12.5+3*22.5+\x*90:\y*1.75 cm)$) () {w%
				\pgfmathparse{mod(7+2*\x,8)}
				\pgfmathprintnumber{\pgfmathresult} ins
			};
		}
		\end{scope}
		%registerrad filling
		\begin{scope}[on background layer]
			\path[fill, color=#3] ($(#5,#6)+(90+22.5+#1*2*22.5:\y *2 cm)$) arc
			(90+22.5+#1*2*22.5:90+4*22.5+#1*2*22.5:\y*2cm) --
			($(#5,#6)+(90+4*22.5+#1*2*22.5:\y cm)$) arc
			(90+4*22.5+#1*2*22.5:90+3*22.5+#1*2*22.5:\y cm) --
			($(#5,#6)+(90+3*22.5+#1*2*22.5:1.5*\y cm)$) arc
			(90+3*22.5+#1*2*22.5:90+2*22.5+#1*2*22.5:1.5*\y cm) --
			($(#5,#6)+(90+2*22.5+#1*2*22.5:\y cm)$) arc
			(90+2*22.5+#1*2*22.5:90+1*22.5+#1*2*22.5:\y cm) -- cycle;
			\path[fill, color=#4] ($(#5,#6)+(90-22.5+#1*2*22.5:\y *2 cm)$) arc
			(90-22.5+#1*2*22.5:90+#1*2*22.5:\y*2cm) -- ($(#5,#6)+(90+#1*2*22.5:1.5*\y cm)$) arc
			(90+#1*2*22.5:90+22.5+#1*2*22.5:1.5*\y cm) --($(#5,#6)+(90+22.5+#1*2*22.5:2*\y cm)$) arc
			(90+22.5+#1*2*22.5:90+2*22.5+#1*2*22.5:2*\y cm) -- ($(#5,#6)+(90+2*22.5+#1*2*22.5:\y cm)$) arc
			(90+2*22.5+#1*2*22.5:90-22.5+#1*2*22.5:\y cm) -- cycle;
			\path[preaction={fill=#4}, Pattern,hatch color=#3]
			($(#5,#6)+(90+22.5+#1*2*22.5:\y *2 cm)$) arc (90+22.5+#1*2*22.5:90+2*22.5+#1*2*22.5:\y*2cm)
			--($(#5,#6)+(90+2*22.5+#1*2*22.5:\y cm)$) arc (90+2*22.5+#1*2*22.5:90+22.5+#1*2*22.5:\y cm) --
			cycle;

			\path[fill, color=#2] ($(#5,#6)+(90+3*22.5+#1*2*22.5:\y *2 cm)$) arc
			(90+3*22.5+#1*2*22.5:90+4*22.5+#1*2*22.5:\y*2cm) -- ($(#5,#6)+(90+4*22.5+#1*2*22.5:1.5*\y cm)$) arc
			(90+4*22.5+#1*2*22.5:90+5*22.5+#1*2*22.5:1.5*\y cm) --($(#5,#6)+(90+5*22.5+#1*2*22.5:2*\y cm)$) arc
			(90+5*22.5+#1*2*22.5:90+6*22.5+#1*2*22.5:2*\y cm) -- ($(#5,#6)+(90+6*22.5+#1*2*22.5:\y cm)$) arc
			(90+6*22.5+#1*2*22.5:90+3*22.5+#1*2*22.5:\y cm) -- cycle;
			\path[preaction={fill=#2}, Pattern,hatch color=#3]
			($(#5,#6)+(90+3*22.5+#1*2*22.5:\y *2 cm)$) arc (90+3*22.5+#1*2*22.5:90+4*22.5+#1*2*22.5:\y*2cm)
			--($(#5,#6)+(90+4*22.5+#1*2*22.5:\y cm)$) arc (90+4*22.5+#1*2*22.5:90+3*22.5+#1*2*22.5:\y cm) --
			cycle;
		\end{scope}
	}
}

\usetikzlibrary{patterns.meta}
\makeatletter
\pgfdeclarepattern{name=hatch,
	parameters={\hatchsize,\hatchangle,\hatchlinewidth},
	bottom left={\pgfpoint{-.1pt}{-.1pt}},
	top right={\pgfpoint{\hatchsize+.1pt}{\hatchsize+.1pt}},
	tile size={\pgfpoint{\hatchsize}{\hatchsize}},
	tile transformation={\pgftransformrotate{\hatchangle}},
	code={
		\pgfsetlinewidth{\hatchlinewidth}
		%\pgfpathmoveto{\pgfpoint{-.1pt}{-.1pt}}
		%\pgfpathlineto{\pgfpoint{\hatchsize+.1pt}{\hatchsize+.1pt}}
		\pgfpathmoveto{\pgfpoint{-.1pt}{\hatchsize+.1pt}}
		\pgfpathlineto{\pgfpoint{\hatchsize+.1pt}{-.1pt}}
		\pgfusepath{stroke}
	}
}

\pgfdeclarepatternformonly[\hatchdistance,\hatchthickness,\hatchcolor]{horizontal}
{\pgfqpoint{0pt}{0pt}}
{\pgfqpoint{\hatchdistance}{\hatchdistance}}
{\pgfpoint{\hatchdistance-1pt}{\hatchdistance-1pt}}%
{
	\pgfsetcolor{\tikz@pattern@color}
	\pgfsetlinewidth{\hatchthickness}
	\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
	\pgfpathlineto{\pgfqpoint{\hatchdistance}{0pt}}
	\pgfsetstrokecolor{\hatchcolor}%        % <-- added
	\pgfusepath{stroke}
}
\makeatother

\tikzset{
	hatch distance/.store in=\hatchdistance,
	hatch distance=10pt,
	hatch thickness/.store in=\hatchthickness,
	hatch thickness=0.3pt,
	hatch color/.store in=\hatchcolor,
	hatch color=black,
}
\usetikzlibrary{fadings}
\tikzfading[name=faderight,left color=transparent!0,right color=transparent!100]
\begin{document}
		\begin{animateinline}[autoplay,loop]{50}
		\fahrrada[6,Orange,ScarletRed,indigo]
		\newframe
		\fahrradb[6,ScarletRed,indigo,aluminium3]
		\newframe
		\fahrrada[4,indigo,aluminium3,SkyBlue]
		\newframe
		\fahrradb[4,aluminium3,SkyBlue,turquoise]
		\newframe
		\fahrrada[2,SkyBlue,turquoise,Chameleon]
		\newframe
		\fahrradb[2,turquoise,Chameleon,Butter]
		\newframe
		\fahrrada[0,Chameleon,Butter,Orange]
		\newframe
		\fahrradb[0,Butter,Orange,ScarletRed]
	\end{animateinline}
\end{document}