5

I'm trying to create a physics illustration of a spinning wheel (see here). I can draw a "flat" sketch of a wheel as following. Are there any nice tricks to make it appear more three-dimensional/realistic?

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}

\tdplotsetmaincoords{100}{210}
\begin{tikzpicture}[tdplot_main_coords]

\def\ax{3}
\def\r{2}
\def\thick{0.15}
\coordinate (O) at (0,0,0);
\begin{scope}[rotate around y=90]
    \draw[fill=lightgray] (O) circle (\r);
    \draw[fill=white] (O) circle (\r-\thick);
    \def\gap{0.05}
    \foreach\a in {0, 30, ..., 150}
    {
    \draw[rotate around z=\a] (-\r+\thick,-\gap,0) --  (\r-\thick,-\gap,0);
    \draw[rotate around z=\a] (-\r+\thick,\gap,0) --  (\r-\thick,\gap,0);
    }
    \draw[fill] (O) circle (0.04*\r);
\end{scope}

\end{tikzpicture}
\end{document}

enter image description here

1 Answer 1

4
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\tdplotsetmaincoords{100}{210}
\begin{document}
\begin{tikzpicture}[tdplot_main_coords]
\def\ax{3}
\def\r{2}
\def\thick{0.15}
\coordinate (O) at (0,0,0);
\begin{scope}[rotate around y=90]
    \draw[fill=lightgray] (0,0,\thick/2) circle[radius=\r] (0,0,\thick/2) circle[x radius=\r-\thick, y radius=-\r+\thick];
    \fill[lightgray] (0,0,0) circle[radius=\r] (0,0,0) circle[x radius=\r-\thick, y radius=-\r+\thick];
    \def\gap{0.05}
    \foreach\a in {0, 30, ..., 150}
    {
    \draw[rotate around z=\a] (-\r+\thick,-\gap,0) --  (\r-\thick,-\gap,0);
    \draw[rotate around z=\a] (-\r+\thick,\gap,0) --  (\r-\thick,\gap,0);
    }
    \draw[fill] (O) circle (0.04*\r);
    \draw[fill=gray] (0,0,-\thick/2) circle[radius=\r] (0,0,-\thick/2) circle[x radius=\r-\thick, y radius=-\r+\thick];
\end{scope}
\end{tikzpicture}
\end{document}

Diagram of bicycle wheel

Edit:

Does not work for all angles, as some conditions are needed if the wheel is seen "from behind". -also I changed theta from 100 to 90 to avoid compensating for this tilt:

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\newcommand{\myphi}{220}
\tdplotsetmaincoords{90}{\myphi}
\begin{document}
\begin{tikzpicture}[tdplot_main_coords]
\def\ax{3}
\def\r{2}
\def\thick{0.15}
\coordinate (O) at (0,0,0);
\begin{scope}[rotate around y=90]
\def\gap{0.05}
\foreach\a in {0, 30, ..., 150}{
  \draw[rotate around z=\a] (-\r+\thick,-\gap,0) --  (\r-\thick,-\gap,0);
  \draw[rotate around z=\a] (-\r+\thick,\gap,0) --  (\r-\thick,\gap,0);
}
 \draw[fill=lightgray] (-\r,0,\thick/2) arc[radius=\r, start angle=180, end angle=0] -- (\r,0,-\thick/2) arc[radius=\r, start angle=0, end angle=-180] -- cycle (-\r+\thick,0,\thick/2) arc[radius=\r-\thick, start angle=180, end angle=360]  -- (\r-\thick,0,-\thick/2) arc[radius=\r-\thick, start angle=0, end angle=180] -- cycle;
\foreach\a in {0, 30, ..., 150}{
  \draw[rotate around z=\a] (-\r+\thick,-\gap,0) --  (0,-\gap,0);
  \draw[rotate around z=\a] (-\r+\thick,\gap,0) --  (0,\gap,0);
}
\draw[fill] (O) circle (0.04*\r);
\draw[fill=gray, opacity=1] (0,0,-\thick/2) circle[radius=\r] (0,0,-\thick/2) circle[x radius=\r-\thick, y radius=-\r+\thick];
\end{scope}
\end{tikzpicture}
\end{document}

220:

Rotated wheel

195:

Rotated wheel

3
  • Thanks! Although, it looks good at this angle, but at other angles the black border of the middle circle becomes apparent.
    – 35T41
    Jan 10, 2022 at 6:35
  • For what angles does it need to work? - all values in [rotate around y=90]? Jan 10, 2022 at 6:55
  • Ideally, for all values of phi (here 210), such that it looks good from every horizontal angle. I admit that your answer solves this specific figure for me, since I only need one angle, so I'll accept your answer. It would just be nice to also have a generalizable wheel for future uses.
    – 35T41
    Jan 10, 2022 at 10:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .