% Author: Izaak Neutelings (August 2021)
\documentclass[border=3pt,tikz]{standalone}
\usepackage{physics}
\usepackage{tikz}
\usepackage[outline]{contour} % glow around text
\usetikzlibrary{calc}
\usetikzlibrary{angles,quotes} % for pic
\usetikzlibrary{arrows.meta}
\usetikzlibrary{bending}
\usetikzlibrary{patterns}
\tikzset{>=latex} % for LaTeX arrow head
\contourlength{1pt}

\colorlet{xcol}{blue!70!black}
\colorlet{vcol}{green!60!black}
\colorlet{acol}{red!50!blue!80!black!80}
\colorlet{myred}{red!65!black}
\colorlet{mypurple}{blue!60!red!80}
\tikzstyle{rvec}=[->,xcol,very thick,line cap=round]
\tikzstyle{vvec}=[->,vcol,very thick,line cap=round]
\tikzstyle{avec}=[->,acol,very thick,line cap=round]
\tikzstyle{force}=[->,myred,very thick,line cap=round]
\tikzstyle{myarr}=[-{Latex[length=3,width=3]}]
\tikzstyle{mysmallarr}=[-{Latex[length=2,width=2]}]
\tikzstyle{myarr2}=[{Latex[length=2,width=3]}-{Latex[length=2,width=3]}]
\tikzstyle{CM}=[red!40!black,fill=red!80!black!80]
\tikzstyle{origin}=[blue!50!black,fill=blue!80!black!80]
\tikzstyle{mass}=[line width=0.6,draw=red!30!black, %rounded corners=1,
                  top color=red!40!black!30,bottom color=red!40!black!10,shading angle=30]
\tikzstyle{ground}=[preaction={fill,top color=black!15,bottom color=black!8,shading angle=20},
                    fill,pattern=north east lines,thick,minimum width=0.3,minimum height=0.6]
\tikzstyle{metal}=[fill,top color=black!40,bottom color=black!20,shading angle=10]
\tikzstyle{stone}=[fill,top color=black!20,bottom color=black!10,shading angle=10]
\tikzstyle{wood}=[draw=brown!30!black,fill,top color=brown!80!black!60,bottom color=brown!80!black!40,shading angle=10]

\tikzset{
  pics/Tin/.style={
    code={
      \def\R{0.10}
      \draw[pic actions,line width=0.6,#1,fill=white] % ,thick
        (0,0) circle (\R) (-135:.75*\R) -- (45:.75*\R) (-45:.75*\R) -- (135:.75*\R);
  }},
  pics/Tout/.style={
    code={
      \def\R{0.10}
      \draw[pic actions,line width=0.6,#1,fill=white] (0,0) circle (\R);
      \fill[pic actions,#1] (0,0) circle (0.3*\R);
  }},
  pics/rotarr/.style={
    code={
      \draw[white,very thick] ({#1*cos(200)},0) arc(-200:30:{#1} and {#1/2}) --++ (125:0.1);
      \draw[->] ({#1*cos(200)},0) coordinate (W1) arc(-200:20:{#1} and {#1/2}) node[midway] (W2) {} --++ (125:0.1) coordinate (W3);
  }},
  pics/Tin/.default=mypurple,
  pics/Tout/.default=mypurple,
  pics/rotarr/.default=0.4,
}

\begin{document}


% MILLSTONE 3D
\def\hs{3.3}      % shaft height
\def\rs{0.3}      % shaft radius
\def\bp{0.4}      % shaft radius horizontal scale
\def\la{1.2}      % axis length
\def\ra{0.14}     % axis radius
\begin{tikzpicture}
  \def\t{0.6}     % wheel thickness
  \def\R{1.6}     % wheel radius
  \def\b{0.6}     % wheel radius horizontal scale
  \def\RG{2.5}    % ground (bedstone) radius
  \def\tG{0.4}    % ground (bedstone) height
  \def\ro{0.11}   % omega rotation arrow radius
  \def\rO{0.15}   % Omega rotation arrow radius
  \def\Rd{(\la+0.78*\t)} % radius dashed circle on bedstone
  \def\ang{10}    % angle perspective stone mill (rhat)
  \def\angt{150}  % angle perspective stone mill (theta hat)
  \def\angp{20}   % angle perspective pole
  \def\F{0.6*\R}  % magnitude of the force
  \def\T{0.35*\R} % torque magnitude
  \coordinate (O) at (0,0);
  \coordinate (P) at (\ang+180:\la); % axis
  \coordinate (M) at (\ang:\t/2); % CM
  \coordinate (O') at ($(P)+(155:0.9*\R)$); % frame origin
  %\coordinate (om) at ($(O)+(\ang-180:0.7*\la)$); % rotation vector omega
  
  % BEDSTONE
  \draw[stone]
    (P)++(-\RG,-\R) --++ (0,-\tG) arc(-180:0:{\RG} and {\bp*\RG}) --++ (0,\tG);
  \draw[stone] % bedstone
    (P)++(0,-\R) ellipse({\RG} and {\bp*\RG});
  \draw[dashed,xcol]
    (P)++(0,-\R) ellipse({\Rd} and {0.95*\bp*\Rd});
  \draw[->] (P)++(0,-\R) --++ (\ang-20:{\Rd} and {0.95*\bp*\Rd})
    node[pos=0.5,below=-1] {R};
  
  \draw[mass]
    (90+\ang/2:{\b*\R} and \R) --++ (\ang:\t)
    arc(90+\ang/2:-90+\ang/2:{\b*\R} and \R) --++ (\ang-180:\t)
    arc(-90+\ang/2:90+\ang/2:{\b*\R} and \R);
  \draw[mass,rounded corners=0.9] (O) ellipse ({\b*\R} and \R); % runner stone
  \draw[myarr] (O) --++ (\ang+40:{\b*\R} and {\R})
    node[midway] {\contour{red!40!black!23}{b}};
  
  % AXIS
  \draw[wood]
    (0,\ra) arc(90+\ang/2:-90+\ang/2:{\ra*\b} and \ra) --++ (\ang-180:\la)
           arc(-90+\ang/2:90+\ang/2:{\ra*\b} and \ra) -- cycle;
  
  % POLE
  \draw[wood] (P) arc(-90+\ang/2:270+\ang/2:{\ra*\b} and \ra);
  \draw[wood] % pole
    (P)++(-\rs,-\R)arc(-180:0:{\rs} and {\bp*\rs}) --++
    (0,\hs) arc(0:-180:{\rs} and {\bp*\rs}) -- cycle
    (P)++(0,{\hs-\R)}) ellipse({\rs} and {\bp*\rs});
  
  % FORCE VECTORS
  \draw[CM] (M) circle(0.5*\ra); % CM
  \draw[origin] (P) circle(0.5*\ra) % origin
    node[left=3,below=0] {O};
  \draw[force] (0,-\R) --++ (0,1.25*\F) node[pos=0.5,left=-3] {$\vb{F}_\mathrm{N}$};
  \draw[force] (M)++(0,-0.4*\ra) --++ (0,-\F) node[pos=0.4,right=-3.2] {$M\vb{g}$};
  \draw[force] (O)++(0,-1.3*\ra) --++ (\ang-180:0.7*\F) node[pos=1,right=3,below=-1.5] {$\vb{F}_\mathrm{c}$};
  
  % ROTATION VECTORS
  \draw[vvec] (O) --++ (\ang-180:0.7*\la) coordinate (om)
    node[pos=0.8,above=1] {$\vb*{\omega}$};
  \draw[vvec] (P)++(0,{0.88*(\hs-\R)}) --++ (0,{0.4*(\hs-\R)}) coordinate (Om)
    node[pos=0.8,left=0] {$\vb*{\Omega}$};
  \draw[mysmallarr] (om)++($(\ang:0.41*\F)+(-100:{\b*\ro} and {\ro})$) arc(-100:160:{\b*\ro} and {\ro});
  \draw[mysmallarr] (Om)++($(0,-0.36*\F)+(150:{\rO} and {\bp*\rO})$) arc(150:430:{\rO} and {\bp*\rO});
  \draw[->] % arrow rotation Omega
    (P)++(\ang-170:0.25*\RG) arc(110:140:{1.2*\Rd} and {0.4*\Rd})
    node[above=2] {$\Omega$};
  \draw[->] % arrow rotation Omega
    (O)++(90:{\b*1.1*\R} and {1.1*\R}) arc(90:120:{\b*1.1*\R} and {1.1*\R})
    node[above=2] {$\omega$};
  
  % TORQUE VECTORS
  \draw[avec] (0,-\R)++(30-\ang:0.12*\R) --++ (180+\angt:1.1*\T)
    node[right=2,below=-1] {$\vb*{\tau}_\text{N}$};
  \draw[avec] (M)++(140-\ang:0.12*\R) --++ (\angt:\T)
    node[pos=0.8,above left=-2] {$\vb*{\tau}_\text{g}$};
  %\draw[myarr2] (\bp*\rs,0.7*\R) --++ (\ang-180:\la+\bp*\rs)
  %  node[midway] {\contour{red!40!black!26}{R}};
  
  % FRAME
  \draw[rvec,{Latex[length=6,width=4]}-{Latex[length=6,width=4]}]
    (O')++(\ang:0.5) node[above=2,right=-2] {$\vu{r}$} --++
    (\ang+180:0.5) --++ (\angt:0.5) node[above=2,left=-2] {$\vu*{\theta}$};
  \draw[rvec,-{Latex[length=6,width=4]}]
    (O') --++ (0,0.5) node[above=-2] {$\vu{z}$};
  
\end{tikzpicture}


% MILLSTONE 2D side view
\def\t{0.80}  % wheel thickness
\def\R{1.6}   % wheel radius
\def\RG{2.3}  % ground (bedstone) radius
\def\hG{0.4}  % ground (bedstone) radius
\def\F{0.49*\R} % force magnitude
\begin{tikzpicture}
  \coordinate (O) at (0,0);
  \coordinate (O') at (155:0.9*\R);
  \coordinate (M) at (\la+\t/2,0);
  \coordinate (N) at (\la+0.63*\t,-\R);
  \coordinate (TG) at (\la+0.91*\t,0);
  \coordinate (TN) at (\la+0.91*\t,-0.90*\R);
  
  % BEDSTONE
  \draw[ground] (-\RG,-\R-\hG) rectangle++ (2*\RG,\hG);
  %\draw[thick] (-\RG,-\R-\hG) |-++ (2*\RG,\hG) --++ (0,-\hG);
  
  \draw[wood,rounded corners=0.9] (-\rs,-\R) rectangle++ (2*\rs,\hs);
  \draw[wood] (\rs,\ra) -|++ (\la,-2*\ra) --++
    (-\la,0) to[out=130,in=-130] cycle;
  \draw[wood,rounded corners=0.9] (\la,-\ra) rectangle++ (1.1*\t,2*\ra);
  \draw[mass,rounded corners=0.9] (M)++(-\t/2,-\R) rectangle++ (\t,2*\R);
  \draw[CM] (M) circle(0.5*\ra); %node[above right=2,scale=0.9] {$M$};
  \draw[<->] (M)++(0.14*\t,0.01) --++ (0,\R-0.02)
    %node[pos=0.5,fill=red!40!black!25,inner sep=0.5] {$b$};
    node[pos=0.5,right=-6] {\contour{red!40!black!26}{$b$}};
  \draw[<->] (0,0.7*\R) --++ (\la+\t/2,0) node[pos=0.5,above=-1] {$R$};
  
  % FORCE
  \draw[force] (M)++(-0.01,-0.05) --++ (0,-\F)
    node[pos=0.5,right=-1.8,opacity=0.3] {\contour{white}{$M\vb{g}$}}
    node[pos=0.5,right=-1.8] {$M\vb{g}$};
  \draw[force] (N)++(0,0.02) --++ (0,1.2*\F)
    node[pos=0.5,right=-2,opacity=0.3] {\contour{white}{$\vb{F}_\mathrm{N}$}}
    node[pos=0.5,right=-2] {$\vb{F}_\mathrm{N}$};
  \draw[force] (0.98*\la,-1.4*\ra) --++ (-0.6*\la,0)
    node[pos=0.3,below=-1] {$\vb{F}_\mathrm{c}$};
  
  % POSITION
  \draw[rvec] (O) -- (M)
    node[midway,above=-2,opacity=0.3] {\contour{white}{$\vb{r}$}}
    node[midway,above=-2] {$\vb{r}$};
  \draw[rvec] (O) -- (N) node[pos=0.52,below=1] {$\vb{r}$};
  \draw[origin] (O) circle(0.5*\ra) % origin
    node[left=3,below=0] {O};
  
  % TORQUE
  \pic[scale=1] at (TG) {Tin};
  \pic[scale=1] at (TN) {Tout};
  \node[mypurple,below=2,right=1] at (TG) {$\vb*\tau_\mathrm{g}$};
  \node[mypurple,below=0.5,right=1] at (TN) {$\vb*\tau_\mathrm{N}$};
  
  % ROTATION VECTOR
  \draw[vvec] (M)++(-0.6*\t,2.6*\ra) --++ (-0.66*\la,0)
    node[pos=0.4,above=-1] {$\vb*{\omega}$};
  \draw[vvec] (0,{0.86*(\hs-\R)}) --++ (0,{0.36*(\hs-\R)})
    node[pos=0.8,left=0] {$\vb*{\Omega}$};
  
  % FRAME
  \draw[rvec,{Latex[length=6,width=4]}-{Latex[length=6,width=4]}]
    (O')++(0.5,0) node[above=2,right=-2] {$\vu{r}$} --++
    (-0.5,0) --++ (0,0.5) node[above=-1] {$\vu{z}$};
  \pic[scale=1] at (O') {Tin=xcol};
  \node[xcol,below=1,left=1] at (O') {$\vu*{\theta}$};
  
\end{tikzpicture}


% MILLSTONE 2D top view
\begin{tikzpicture}
  \def\Rd{\la+\t/2}
  \def\T{0.4*\R} % torque magnitude
  \def\ang{20}
  \coordinate (O) at (0,0);
  \coordinate (O') at (158:0.55*\Rd);
  \coordinate (M) at (\ang:\la+\t/2);
  \coordinate (FG) at ($(M)+(\ang+40:0.4*\t)$);
  \coordinate (FN) at ($(M)+(\ang-40:0.4*\t)$);
  
  \draw[stone] (O) circle(\RG);
  
  \draw[wood,rounded corners=0.9,rotate=\ang]
    (0,-\ra) rectangle++ (\la+1.1*\t,2*\ra);
  \draw[wood] (O) circle(\rs);
  \draw[mass,rounded corners=0.9,rotate around={\ang:(M)}]
    (M)++(-\t/2,-\R) rectangle++ (\t,2*\R);
  \draw[dashed,xcol] (O) circle(\Rd);
  \draw[CM] (M) circle(0.5*\ra);
  
  % FORCE
  \draw[force] (\ang:\la)++(\ang-90:1.5*\ra) --++ (\ang-180:0.6*\la)
    node[pos=1,right=3,below=-1.5] {$\vb{F}_\mathrm{c}$};
  \node[myred,right=2,above=-1,opacity=0.3] at (FG) {\contour{white}{$\vb{F}_\mathrm{g}$}};
  \node[myred,right=2,above=-1] at (FG) {$\vb{F}_\mathrm{g}$};
  \node[myred,right=6,below=1,opacity=0.3] at (FN) {\contour{white}{$\vb{F}_\mathrm{N}$}};
  \node[myred,right=6,below=1] at (FN) {$\vb{F}_\mathrm{N}$};
  \pic[scale=1] at (FG) {Tin={myred}};
  \pic[scale=1] at (FN) {Tout={myred}};
  
  % TORQUE
  \draw[force,mypurple] (M)++(\ang+90:0.06) --++ (\ang+90:\T)
    node[right=0,above=-3] {$\vb*{\tau}_\mathrm{g}$};
  \draw[force,mypurple] (M)++(\ang-90:0.06) --++ (\ang-90:\T)
    node[right=4,below=-2] {$\vb*{\tau}_\mathrm{N}$};
  
  % ROTATION VECTOR
  \draw[vvec] (\ang:0.94*\la) --++ (\ang-180:0.66*\la)
    node[pos=0.8,above=2] {$\vb*{\omega}$};
  \draw[->] (86:1.2*\Rd) arc(86:115:1.2*\Rd)
    node[midway,above left=-1.5] {$\Omega$};
  \pic[scale=1] at (O) {Tout={vcol}};
  \node[vcol,below left=-0.7,opacity=0.3] at (O) {\contour{white}{$\vb*{\Omega}$}};
  \node[vcol,below left=-0.7] at (O) {$\vb*{\Omega}$};
  
  % FRAME
  \draw[rvec,{Latex[length=6,width=4]}-{Latex[length=6,width=4]}]
    (O')++(\ang:0.5) node[above=2,right=-2] {$\vu{r}$} --++
    (\ang+180:0.5) --++ (\ang+90:0.5)
    node[above left=-4] {\contour{black!18}{$\vu*{\theta}$}};
  \pic[scale=1] at (O') {Tout=xcol};
  \node[xcol,below left=-1] at (O') {$\vu{z}$};
    
\end{tikzpicture}


\end{document}
