3

I am trying to draw a wheel-like figure like this. I had used xfig.

enter image description here

I wonder whether I can also use LaTex tikz or other ways to get similar figure with the additional criterion

  • the area enclosed by the four red rectangulars/squares --- should have been filled in with a gray shaded but still transparent color (like tunable transparency 10%, 30%, 50%, 70% for each wing of the 4 wings of the wheel) or so.

Do any experts know how to do this?

Thank you! (I will accept the answer very soon)

1 Answers1

10

Yes, LaTeX can do such things.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{decorations.markings}
\begin{document}
\tikzset{->-/.style={decoration={
  markings,
  mark=at position #1 with {\arrow{>}}},postaction={decorate}}}
\begin{tikzpicture}[thick,scale=5,>=stealth]
\tdplotsetmaincoords{70}{60}
\begin{scope}[tdplot_main_coords]
 \draw[thick,blue] (0,0,0) -- (0,0,1.7);
 \foreach \X/\Y in {0/0.2,90/0.3,180/0.4,270/0.5}
 {\tdplotsetrotatedcoords{\X}{0}{0}
 \begin{scope}[tdplot_rotated_coords]
  \draw[thick,->-=0.075,->-=0.575,fill=gray,opacity=\Y] (0.1,0,0) -- (1.6,0,0) -- (1.6,0,1.5) -- (0.1,0,1.5) -- cycle;
  \draw[thick,red,->-=0.4,->-=0.9] (0.2,0,0.1) -- (0.2,0,1.4)  -- (1.5,0,1.4) --
  (1.5,0,0.1) -- cycle;
 \end{scope}}
 \draw[->,blue,thick] plot[variable=\x,domain=20:-200,samples=31,smooth] ({0.3*sin(\x)},{0.3*cos(\x)},1.8);
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

  • 1
    Thanks +1 - you are the tikz god! Can you remind me the function to tune the transparency of the shade area? – annie marie cœur Nov 30 '18 at 04:54
  • 1
    @annieheart opacity=<value>. In this example the four planes have the opacitie 0.2 ... 0.5, i.e. the \Y value in the foreach loop. –  Nov 30 '18 at 04:56
  • I forgot to mention that ->- is from https://tex.stackexchange.com/a/39282/121799. –  Nov 30 '18 at 05:12