Penrose tiles with TikZ
Source code in LaTeX:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{ifthen}
\usepackage{etoolbox}
% n: number of decomposition to do
% a, b, c: triangle coordinates
% inv: direction of rotation
% — 0 -> anticlockwise
% — 1 -> clockwise
% boolean dartandkite:
% — true  -> draw dart and kite
% — false -> draw Robinson triangle (semidart or semikite)
% phi: golden ratio (1+sqrt(5))/2
% invphi: 1/phi
% \cur: current direction of rotation
% \inv: inverse current direction of rotation
\pgfmathsetmacro{\invphi}{2/(1+sqrt(5))}
\newbool{dartandkite}
\setbool{dartandkite}{false}
\newcommand\penrosesemikite[5]{% n, a, b, c, inv
  \ifthenelse{0<#1}{<br/>
    {
      % decomposition (semikite => 2 semikites and 1 semidart)
      \pgfmathtruncatemacro{\n}{#1-1}
      \coordinate(#2#3) at ($(#2)!\invphi!(#3)$);
      \coordinate(#2#4) at ($(#4)!\invphi!(#2)$);
      \ifthenelse{0<#5}{\def\inv{0}\def\cur{1}}{\def\inv{1}\def\cur{0}}<br/>
      \penrosesemikite{\n}{#4}{#2#3}{#3}{\cur}
      \penrosesemikite{\n}{#4}{#2#3}{#2#4}{\inv}
      \penrosesemidart{\n}{#2}{#2#3}{#2#4}{\cur}
    }
  }{
    \ifthenelse{0<#5}{<br/>
      \ifbool{dartandkite}{
        % fill current semikite and opposite semikite
        \coordinate(p) at ($(#2)!(#4)!(#3)$);
        \coordinate(s) at ($(#4)!2!(p)$);
        \fill[fill=colkite] (#2) — (s) — (#3) — (#4) — cycle;
        % draw jonction line between current semikite and opposite semikite
        % \draw[dotted] (#2) — (#3);
      }{
        % fill current semikite
        \fill[fill=colkite] (#2) — (#3) — (#4) — cycle;
      }
    }{
      \notbool{dartandkite}{
        % fill current semikite
        \fill[fill=colkite] (#2) — (#3) — (#4) — cycle;
      }{}
    }
  }
}
\newcommand\penrosesemidart[5]{% n, a, b, c, inv
  \ifthenelse{0<#1}{<br/>
    {
      % decomposition (semidart => 1 semikite and 1 semidart)
      \pgfmathtruncatemacro{\n}{#1-1}
      \coordinate(#2#3) at ($(#2)!\invphi!(#3)$);
      \ifthenelse{0<#5}{\def\inv{0}\def\cur{1}}{\def\inv{1}\def\cur{0}}<br/>
      \penrosesemikite{\n}{#2}{#4}{#2#3}{\cur}
      \penrosesemidart{\n}{#3}{#4}{#2#3}{\inv}
    }
  }{
    \ifthenelse{0<#5}{<br/>
      \ifbool{dartandkite}{
        % fill current semidart and opposite semidart
        \coordinate(p) at ($(#2)!(#3)!(#4)$);
        \coordinate(s) at ($(#3)!2!(p)$);
        \fill[fill=coldart] (#2) — (#3) — (#4) — (s) — cycle;
        % draw jonction line between current semidart and opposite semidart
        %\draw[dotted] (#2) — (#4);
      }{
        % fill current semidart
        \fill[fill=coldart] (#2) — (#3) — (#4) — cycle;
      }
    }{
      \notbool{dartandkite}{
        % fill current semikite
        \fill[fill=coldart] (#2) — (#3) — (#4) — cycle;
      }{}
    }
  }
}
\begin{document}
\begin{tikzpicture}%
  [line width=.5pt,
  every path/.style={draw=white,line join=round}]
  \pgfmathtruncatemacro{\len}{4}
  \colorlet{coldart}{blue!50!white}
  \colorlet{colkite}{orange}
  \begin{scope}
    \setbool{dartandkite}{false}
    \foreach \level in {0,…,4}{
      \begin{scope}[rotate=\level*72]
        \coordinate (a) at (36:0);
        \path (a) ++(0:\len*1cm) coordinate (b);
        \path (a) ++(36:\len*1cm) coordinate (c);
        \path (a) ++(72:\len*1cm) coordinate (d);
        \penrosesemikite{5}{a}{b}{c}{0}
        \penrosesemikite{5}{a}{d}{c}{1}
      \end{scope}
    }
  \end{scope}
  \begin{scope}[yshift=-8cm]
    \setbool{dartandkite}{true}
    \foreach \level in {0,…,4}{
      \begin{scope}[rotate=\level*72]
        \coordinate (a) at (36:0);
        \path (a) ++(0:\len*1cm) coordinate (b);
        \path (a) ++(36:\len*1cm) coordinate (c);
        \path (a) ++(72:\len*1cm) coordinate (d);
        \penrosesemikite{5}{a}{b}{c}{0}
        \penrosesemikite{5}{a}{d}{c}{1}
      \end{scope}
    }
  \end{scope}
\end{tikzpicture}
\end{document}

Penrose tiles with TikZ

Source code in LaTeX:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{ifthen}
\usepackage{etoolbox}
% n: number of decomposition to do
% a, b, c: triangle coordinates
% inv: direction of rotation
% — 0 -> anticlockwise
% — 1 -> clockwise
% boolean dartandkite:
% — true -> draw dart and kite
% — false -> draw Robinson triangle (semidart or semikite)
% phi: golden ratio (1+sqrt(5))/2
% invphi: 1/phi
% \cur: current direction of rotation
% \inv: inverse current direction of rotation
\pgfmathsetmacro{\invphi}{2/(1+sqrt(5))}
\newbool{dartandkite}
\setbool{dartandkite}{false}
\newcommand\penrosesemikite[5]{% n, a, b, c, inv
\ifthenelse{0<#1}{<br/> {
% decomposition (semikite => 2 semikites and 1 semidart)
\pgfmathtruncatemacro{\n}{#1-1}
\coordinate(#2#3) at ($(#2)!\invphi!(#3)$);
\coordinate(#2#4) at ($(#4)!\invphi!(#2)$);
\ifthenelse{0<#5}{\def\inv{0}\def\cur{1}}{\def\inv{1}\def\cur{0}}<br/> \penrosesemikite{\n}{#4}{#2#3}{#3}{\cur}
\penrosesemikite{\n}{#4}{#2#3}{#2#4}{\inv}
\penrosesemidart{\n}{#2}{#2#3}{#2#4}{\cur}
}
}{
\ifthenelse{0<#5}{<br/> \ifbool{dartandkite}{
% fill current semikite and opposite semikite
\coordinate(p) at ($(#2)!(#4)!(#3)$);
\coordinate(s) at ($(#4)!2!(p)$);
\fill[fill=colkite] (#2) — (s) — (#3) — (#4) — cycle;
% draw jonction line between current semikite and opposite semikite
% \draw[dotted] (#2) — (#3);
}{
% fill current semikite
\fill[fill=colkite] (#2) — (#3) — (#4) — cycle;
}
}{
\notbool{dartandkite}{
% fill current semikite
\fill[fill=colkite] (#2) — (#3) — (#4) — cycle;
}{}
}
}
}

\newcommand\penrosesemidart[5]{% n, a, b, c, inv
\ifthenelse{0<#1}{<br/> {
% decomposition (semidart => 1 semikite and 1 semidart)
\pgfmathtruncatemacro{\n}{#1-1}
\coordinate(#2#3) at ($(#2)!\invphi!(#3)$);
\ifthenelse{0<#5}{\def\inv{0}\def\cur{1}}{\def\inv{1}\def\cur{0}}<br/> \penrosesemikite{\n}{#2}{#4}{#2#3}{\cur}
\penrosesemidart{\n}{#3}{#4}{#2#3}{\inv}
}
}{
\ifthenelse{0<#5}{<br/> \ifbool{dartandkite}{
% fill current semidart and opposite semidart
\coordinate(p) at ($(#2)!(#3)!(#4)$);
\coordinate(s) at ($(#3)!2!(p)$);
\fill[fill=coldart] (#2) — (#3) — (#4) — (s) — cycle;
% draw jonction line between current semidart and opposite semidart
%\draw[dotted] (#2) — (#4);
}{
% fill current semidart
\fill[fill=coldart] (#2) — (#3) — (#4) — cycle;
}
}{
\notbool{dartandkite}{
% fill current semikite
\fill[fill=coldart] (#2) — (#3) — (#4) — cycle;
}{}
}
}
}

\begin{document}
\begin{tikzpicture}%
[line width=.5pt,
every path/.style={draw=white,line join=round}]
\pgfmathtruncatemacro{\len}{4}
\colorlet{coldart}{blue!50!white}
\colorlet{colkite}{orange}
\begin{scope}
\setbool{dartandkite}{false}
\foreach \level in {0,…,4}{
\begin{scope}[rotate=\level*72]
\coordinate (a) at (36:0);
\path (a) ++(0:\len*1cm) coordinate (b);
\path (a) ++(36:\len*1cm) coordinate (c);
\path (a) ++(72:\len*1cm) coordinate (d);
\penrosesemikite{5}{a}{b}{c}{0}
\penrosesemikite{5}{a}{d}{c}{1}
\end{scope}
}
\end{scope}
\begin{scope}[yshift=-8cm]
\setbool{dartandkite}{true}
\foreach \level in {0,…,4}{
\begin{scope}[rotate=\level*72]
\coordinate (a) at (36:0);
\path (a) ++(0:\len*1cm) coordinate (b);
\path (a) ++(36:\len*1cm) coordinate (c);
\path (a) ++(72:\len*1cm) coordinate (d);
\penrosesemikite{5}{a}{b}{c}{0}
\penrosesemikite{5}{a}{d}{c}{1}
\end{scope}
}
\end{scope}
\end{tikzpicture}
\end{document}