17

I need a little symbol for a wind power (éolienne) but I'm not an artist ;-) If any Leonado da Vinci or Picasso here could improve my try, I will be very glad.

enter image description here

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
    \filldraw (0,0)--(280:.7)--(260:.7)--cycle ;
    \draw[very thick] (0,0)--(90:.4) ;
    \draw[very thick] (0,0)--(210:.4) ;
    \draw[very thick] (0,0)--(330:.4) ;
\end{tikzpicture}

\end{document}
lockstep
  • 250,273
Tarass
  • 16,912

1 Answers1

33

Don't know about artistry, but here are three variations. This uses the latest PGF release for the pic handler but it isn't essential: the code inside the pic can be copied and used outside as long as #1 is replaced with a number from 1 to 3.

\documentclass[tikz,border=5]{standalone}
\tikzset{%
wind turbine/.pic={
  \tikzset{path/.style={fill, draw=white, ultra thick, line join=round}}
  \path [path] 
    (-.25,0) arc (180:360:.25 and .0625) -- (.0625,3) -- (-.0625,3) -- cycle;
  \foreach \i in {90, 210, 330}{
    \ifcase#1
    \or
      \path [path, shift=(90:3), rotate=\i] 
        (.5,-.1875) arc (270:90:.5 and .1875) arc (90:-90:1.5 and .1875);
    \or
      \path [path, shift=(90:3), rotate=\i] 
        (0,0.125) -- (2,0.125) -- (2,0) -- (0.5,-0.375) -- cycle;
    \or
      \path [path, shift=(90:3), rotate=\i]
        (0,-0.125) arc (180:0:1 and 0.125) -- ++(0,0.125) arc (0:180:1 and 0.25) -- cycle;
    \fi
  }
  \path [path] (0,3) circle [radius=.25];
}}
\begin{document}
\begin{tikzpicture}
\path
  (0,0) pic {wind turbine=1}
  (4,0) pic {wind turbine=2}
  (8,0) pic {wind turbine=3};
\end{tikzpicture}
\end{document}

enter image description here

Mark Wibrow
  • 70,437
  • 2
    Thank's. As I need 13 wind turbines positionned in a quater of circle, I add a little random angle for the positionning of the blades. \pgfmathsetmacro{\Rand}{(rand*60 + 1) - 30} ; \foreach \i in {90, 210, 330}{ \ifcase#1 \or \path [path, shift=(90:3), rotate=\i+\Rand] ... – Tarass Apr 26 '14 at 07:39
  • Out of curiosity: what for? "13 wind turbines positioned in a quarter of circle" sounds a bit... strange. ;) – mbork Apr 26 '14 at 07:46
  • 4
    To see how it will look in my garden ;-) more seriously it's for a concrete math exercice. There is an area around the wind turbines forbiden for navigation. Children have to calculate the surface of this area. – Tarass Apr 26 '14 at 08:03
  • @mbork If you want to see what its looks like. http://tex.stackexchange.com/questions/173569/tikz-pic-parameter – Tarass Apr 26 '14 at 10:23
  • 2
    Nice exercice, I'll steal it ;-) – remjg Apr 26 '14 at 11:26
  • 1
    @remjg on va faire des échanges ? – Tarass Apr 26 '14 at 18:12
  • Please stick to English, guys. – jub0bs May 01 '14 at 11:05
  • @Mark Wilbrow; I can't run your code...I get an error: undefined control sequence.\end{tikzpicture}. How can I resolve this? – user95439 May 13 '17 at 12:21
  • @KKK the code still compiles for me as is. I guess it is a problem with your TeX distribution. – Mark Wibrow May 18 '17 at 07:11