How to draw a waving flag in TikZ












10















Let's take the flag of Germany as an example, because the flag is way quite simple and its waving state can be easily drawn "manually". But I am asking about general flag (the flag of any country/group, even the flag of my team).





Normal flag (1)



documentclass[tikz]{standalone}
usepackage{xcolor}
definecolor{gerbla}{RGB}{0,0,0}
definecolor{gerred}{RGB}{255,0,0}
definecolor{geryel}{RGB}{255,204,0}
begin{document}
begin{tikzpicture}
fill[gerbla] (0,2) rectangle (5,3);
fill[gerred] (0,1) rectangle (5,2);
fill[geryel] (0,0) rectangle (5,1);
end{tikzpicture}
end{document}


enter image description here



Waving flag (2) (the ratio may not be true)



documentclass[tikz]{standalone}
usepackage{xcolor}
definecolor{gerbla}{RGB}{0,0,0}
definecolor{gerred}{RGB}{255,0,0}
definecolor{geryel}{RGB}{255,204,0}
begin{document}
begin{tikzpicture}
fill[gerbla] (0,3) to[out=0,in=180] (4,2) -- (4,1) to[out=180,in=0] (0,2) -- cycle;
fill[gerred] (0,2) to[out=0,in=180] (4,1) -- (4,0) to[out=180,in=0] (0,1) -- cycle;
fill[geryel] (0,1) to[out=0,in=180] (4,0) -- (4,-1) to[out=180,in=0] (0,0) -- cycle;
end{tikzpicture}
end{document}


enter image description here



Advanced waving flag (3)



enter image description here



(unTikZified – image taken from Emojipedia)





Question



How to draw a waving flag? In other word, say I already have a rectangle-shape flag (1), with many patterns and items on it (even with some includegraphics), how can I "wave" (1) to get (2), where




  1. The ratio length/width is still correct.

  2. The images, patterns, etc. on the flag are waved too, and these items still fit correctly with the overall flag.


Bonus question



If I already have (1) or (2), how can I get shadow effects and light effects like (3)?





The code for the flag of the United States, as requested by @marmot:



documentclass[tikz]{standalone}
usetikzlibrary{shapes}
usepackage{xcolor}
begin{document}
begin{tikzpicture}
definecolor{usblue}{rgb}{.234,.233,.430}
definecolor{usared}{rgb}{.698,.132,.203}
fill[usared] (0,0) rectangle (1.9,1);
foreach i in {1,3,...,11}
fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
foreach i in {1,2,3,4,5,6} {
foreach j in {1,2,3,4,5} {
node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
}
}
foreach i in {1,2,3,4,5} {
foreach j in {1,2,3,4} {
node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
}
}
end{tikzpicture}
end{document}


enter image description here










share|improve this question





























    10















    Let's take the flag of Germany as an example, because the flag is way quite simple and its waving state can be easily drawn "manually". But I am asking about general flag (the flag of any country/group, even the flag of my team).





    Normal flag (1)



    documentclass[tikz]{standalone}
    usepackage{xcolor}
    definecolor{gerbla}{RGB}{0,0,0}
    definecolor{gerred}{RGB}{255,0,0}
    definecolor{geryel}{RGB}{255,204,0}
    begin{document}
    begin{tikzpicture}
    fill[gerbla] (0,2) rectangle (5,3);
    fill[gerred] (0,1) rectangle (5,2);
    fill[geryel] (0,0) rectangle (5,1);
    end{tikzpicture}
    end{document}


    enter image description here



    Waving flag (2) (the ratio may not be true)



    documentclass[tikz]{standalone}
    usepackage{xcolor}
    definecolor{gerbla}{RGB}{0,0,0}
    definecolor{gerred}{RGB}{255,0,0}
    definecolor{geryel}{RGB}{255,204,0}
    begin{document}
    begin{tikzpicture}
    fill[gerbla] (0,3) to[out=0,in=180] (4,2) -- (4,1) to[out=180,in=0] (0,2) -- cycle;
    fill[gerred] (0,2) to[out=0,in=180] (4,1) -- (4,0) to[out=180,in=0] (0,1) -- cycle;
    fill[geryel] (0,1) to[out=0,in=180] (4,0) -- (4,-1) to[out=180,in=0] (0,0) -- cycle;
    end{tikzpicture}
    end{document}


    enter image description here



    Advanced waving flag (3)



    enter image description here



    (unTikZified – image taken from Emojipedia)





    Question



    How to draw a waving flag? In other word, say I already have a rectangle-shape flag (1), with many patterns and items on it (even with some includegraphics), how can I "wave" (1) to get (2), where




    1. The ratio length/width is still correct.

    2. The images, patterns, etc. on the flag are waved too, and these items still fit correctly with the overall flag.


    Bonus question



    If I already have (1) or (2), how can I get shadow effects and light effects like (3)?





    The code for the flag of the United States, as requested by @marmot:



    documentclass[tikz]{standalone}
    usetikzlibrary{shapes}
    usepackage{xcolor}
    begin{document}
    begin{tikzpicture}
    definecolor{usblue}{rgb}{.234,.233,.430}
    definecolor{usared}{rgb}{.698,.132,.203}
    fill[usared] (0,0) rectangle (1.9,1);
    foreach i in {1,3,...,11}
    fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
    fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
    foreach i in {1,2,3,4,5,6} {
    foreach j in {1,2,3,4,5} {
    node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
    }
    }
    foreach i in {1,2,3,4,5} {
    foreach j in {1,2,3,4} {
    node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
    }
    }
    end{tikzpicture}
    end{document}


    enter image description here










    share|improve this question



























      10












      10








      10


      4






      Let's take the flag of Germany as an example, because the flag is way quite simple and its waving state can be easily drawn "manually". But I am asking about general flag (the flag of any country/group, even the flag of my team).





      Normal flag (1)



      documentclass[tikz]{standalone}
      usepackage{xcolor}
      definecolor{gerbla}{RGB}{0,0,0}
      definecolor{gerred}{RGB}{255,0,0}
      definecolor{geryel}{RGB}{255,204,0}
      begin{document}
      begin{tikzpicture}
      fill[gerbla] (0,2) rectangle (5,3);
      fill[gerred] (0,1) rectangle (5,2);
      fill[geryel] (0,0) rectangle (5,1);
      end{tikzpicture}
      end{document}


      enter image description here



      Waving flag (2) (the ratio may not be true)



      documentclass[tikz]{standalone}
      usepackage{xcolor}
      definecolor{gerbla}{RGB}{0,0,0}
      definecolor{gerred}{RGB}{255,0,0}
      definecolor{geryel}{RGB}{255,204,0}
      begin{document}
      begin{tikzpicture}
      fill[gerbla] (0,3) to[out=0,in=180] (4,2) -- (4,1) to[out=180,in=0] (0,2) -- cycle;
      fill[gerred] (0,2) to[out=0,in=180] (4,1) -- (4,0) to[out=180,in=0] (0,1) -- cycle;
      fill[geryel] (0,1) to[out=0,in=180] (4,0) -- (4,-1) to[out=180,in=0] (0,0) -- cycle;
      end{tikzpicture}
      end{document}


      enter image description here



      Advanced waving flag (3)



      enter image description here



      (unTikZified – image taken from Emojipedia)





      Question



      How to draw a waving flag? In other word, say I already have a rectangle-shape flag (1), with many patterns and items on it (even with some includegraphics), how can I "wave" (1) to get (2), where




      1. The ratio length/width is still correct.

      2. The images, patterns, etc. on the flag are waved too, and these items still fit correctly with the overall flag.


      Bonus question



      If I already have (1) or (2), how can I get shadow effects and light effects like (3)?





      The code for the flag of the United States, as requested by @marmot:



      documentclass[tikz]{standalone}
      usetikzlibrary{shapes}
      usepackage{xcolor}
      begin{document}
      begin{tikzpicture}
      definecolor{usblue}{rgb}{.234,.233,.430}
      definecolor{usared}{rgb}{.698,.132,.203}
      fill[usared] (0,0) rectangle (1.9,1);
      foreach i in {1,3,...,11}
      fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
      fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
      foreach i in {1,2,3,4,5,6} {
      foreach j in {1,2,3,4,5} {
      node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
      }
      }
      foreach i in {1,2,3,4,5} {
      foreach j in {1,2,3,4} {
      node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
      }
      }
      end{tikzpicture}
      end{document}


      enter image description here










      share|improve this question
















      Let's take the flag of Germany as an example, because the flag is way quite simple and its waving state can be easily drawn "manually". But I am asking about general flag (the flag of any country/group, even the flag of my team).





      Normal flag (1)



      documentclass[tikz]{standalone}
      usepackage{xcolor}
      definecolor{gerbla}{RGB}{0,0,0}
      definecolor{gerred}{RGB}{255,0,0}
      definecolor{geryel}{RGB}{255,204,0}
      begin{document}
      begin{tikzpicture}
      fill[gerbla] (0,2) rectangle (5,3);
      fill[gerred] (0,1) rectangle (5,2);
      fill[geryel] (0,0) rectangle (5,1);
      end{tikzpicture}
      end{document}


      enter image description here



      Waving flag (2) (the ratio may not be true)



      documentclass[tikz]{standalone}
      usepackage{xcolor}
      definecolor{gerbla}{RGB}{0,0,0}
      definecolor{gerred}{RGB}{255,0,0}
      definecolor{geryel}{RGB}{255,204,0}
      begin{document}
      begin{tikzpicture}
      fill[gerbla] (0,3) to[out=0,in=180] (4,2) -- (4,1) to[out=180,in=0] (0,2) -- cycle;
      fill[gerred] (0,2) to[out=0,in=180] (4,1) -- (4,0) to[out=180,in=0] (0,1) -- cycle;
      fill[geryel] (0,1) to[out=0,in=180] (4,0) -- (4,-1) to[out=180,in=0] (0,0) -- cycle;
      end{tikzpicture}
      end{document}


      enter image description here



      Advanced waving flag (3)



      enter image description here



      (unTikZified – image taken from Emojipedia)





      Question



      How to draw a waving flag? In other word, say I already have a rectangle-shape flag (1), with many patterns and items on it (even with some includegraphics), how can I "wave" (1) to get (2), where




      1. The ratio length/width is still correct.

      2. The images, patterns, etc. on the flag are waved too, and these items still fit correctly with the overall flag.


      Bonus question



      If I already have (1) or (2), how can I get shadow effects and light effects like (3)?





      The code for the flag of the United States, as requested by @marmot:



      documentclass[tikz]{standalone}
      usetikzlibrary{shapes}
      usepackage{xcolor}
      begin{document}
      begin{tikzpicture}
      definecolor{usblue}{rgb}{.234,.233,.430}
      definecolor{usared}{rgb}{.698,.132,.203}
      fill[usared] (0,0) rectangle (1.9,1);
      foreach i in {1,3,...,11}
      fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
      fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
      foreach i in {1,2,3,4,5,6} {
      foreach j in {1,2,3,4,5} {
      node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
      }
      }
      foreach i in {1,2,3,4,5} {
      foreach j in {1,2,3,4} {
      node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
      }
      }
      end{tikzpicture}
      end{document}


      enter image description here







      tikz-pgf






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 days ago







      JouleV

















      asked Apr 6 at 3:29









      JouleVJouleV

      11.7k22561




      11.7k22561






















          1 Answer
          1






          active

          oldest

          votes


















          15














          You can use nonlinear transformations to achieve this effect.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{GermanFlag}{%
          fill[gerbla] (0,2) rectangle (4,3);
          fill[gerred] (0,1) rectangle (4,2);
          fill[geryel] (0,0) rectangle (4,1);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=1]
          begin{scope}[local bounding box=linear]
          GermanFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          GermanFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (2,3);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (2,0) rectangle (4,3);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          Of course, this works with any flag you have the TikZ code for, including of course your nice US flag.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[local bounding box=linear]
          USFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=2.5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          And here is something for Black Mild.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          tikzdeclarecoordinatesystem{flag}{% https://tex.stackexchange.com/a/434247/121799
          tikz@scan@one@pointrelax(#1)
          flagtransformation
          }
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          foreach X in {0,5,...,95}
          {begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[xshift=X pt,
          local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          shade[left color=gray,right color=gray!70,middle color=gray!20]
          (0,1.05) rectangle ++ (-0.1,-3);
          end{scope}
          end{tikzpicture}}
          end{document}


          enter image description here



          This answer has the codes for many flags, out of which I picked Iceland. (Note that if the flag contains shapes, you need to say transform shape nonlinear=true.) The shading can be added on top.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          definecolor{SkyBlue}{rgb}{0.00784314,0.32156864,0.61176473}
          definecolor{FireRed}{rgb}{0.86274511,0.11764706,0.20784314}
          newcommandIcelandFlag{
          fill[SkyBlue] (0,0) rectangle (25,18);
          fill[white] (7,0) rectangle (11,18);
          fill[white] (0,7) rectangle (25,11);
          fill[FireRed] (8,0) rectangle (10,18);
          fill[FireRed] (0,8) rectangle (25,10);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=0.15]
          begin{scope}[local bounding box=linear]
          IcelandFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=35cm,local bounding box=nonlinear]
          pgftransformnonlinear{flagtransformation}
          IcelandFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (12.5,18);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (12.5,0) rectangle (25,18);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          In order to draw a 3d flag, you may use tikz-3dplot.
          With shade you can get something like this.



          documentclass[tikz]{standalone}
          usepackage{tikz-3dplot}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          begin{document}
          tdplotsetmaincoords{70}{20}
          begin{tikzpicture}[tdplot_main_coords]
          % draw[-stealth] (0,0,0) -- (2,0,0) node[pos=1.1]{$x$};
          % draw[-stealth] (0,0,0) -- (0,2,0) node[pos=1.1]{$y$};
          foreach X [count=Y] in {gerbla,gerred,geryel}
          {shade[left color=X,right color=X!70!black,middle color=X!70!white]
          plot[variable=x,domain=0:2] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=2:0] (x,{0.2*sin(x*90)},3-Y);
          shade[left color=X!70!black,right color=X,middle color=X!70!white]
          plot[variable=x,domain=2:4] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=4:2] (x,{0.2*sin(x*90)},3-Y);}
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer


























          • I'm afraid this only answers the bonus question, for flags of Germany, Netherlands, etc. only. How can it deal with, for example, the US flag?

            – JouleV
            Apr 6 at 3:57






          • 1





            @JouleV It does work if you set transform shape nonlinear=true.

            – marmot
            2 days ago






          • 1





            @marmot One word: perfect! Thanks you very much!!!!!

            – JouleV
            2 days ago






          • 1





            @BlackMild I quickly added something, surely it can be improved.

            – marmot
            2 days ago






          • 1





            @JouleV OK OK, I give in. Now it is attached to some post. ;-)

            – marmot
            2 days ago














          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483459%2fhow-to-draw-a-waving-flag-in-tikz%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          15














          You can use nonlinear transformations to achieve this effect.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{GermanFlag}{%
          fill[gerbla] (0,2) rectangle (4,3);
          fill[gerred] (0,1) rectangle (4,2);
          fill[geryel] (0,0) rectangle (4,1);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=1]
          begin{scope}[local bounding box=linear]
          GermanFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          GermanFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (2,3);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (2,0) rectangle (4,3);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          Of course, this works with any flag you have the TikZ code for, including of course your nice US flag.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[local bounding box=linear]
          USFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=2.5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          And here is something for Black Mild.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          tikzdeclarecoordinatesystem{flag}{% https://tex.stackexchange.com/a/434247/121799
          tikz@scan@one@pointrelax(#1)
          flagtransformation
          }
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          foreach X in {0,5,...,95}
          {begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[xshift=X pt,
          local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          shade[left color=gray,right color=gray!70,middle color=gray!20]
          (0,1.05) rectangle ++ (-0.1,-3);
          end{scope}
          end{tikzpicture}}
          end{document}


          enter image description here



          This answer has the codes for many flags, out of which I picked Iceland. (Note that if the flag contains shapes, you need to say transform shape nonlinear=true.) The shading can be added on top.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          definecolor{SkyBlue}{rgb}{0.00784314,0.32156864,0.61176473}
          definecolor{FireRed}{rgb}{0.86274511,0.11764706,0.20784314}
          newcommandIcelandFlag{
          fill[SkyBlue] (0,0) rectangle (25,18);
          fill[white] (7,0) rectangle (11,18);
          fill[white] (0,7) rectangle (25,11);
          fill[FireRed] (8,0) rectangle (10,18);
          fill[FireRed] (0,8) rectangle (25,10);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=0.15]
          begin{scope}[local bounding box=linear]
          IcelandFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=35cm,local bounding box=nonlinear]
          pgftransformnonlinear{flagtransformation}
          IcelandFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (12.5,18);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (12.5,0) rectangle (25,18);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          In order to draw a 3d flag, you may use tikz-3dplot.
          With shade you can get something like this.



          documentclass[tikz]{standalone}
          usepackage{tikz-3dplot}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          begin{document}
          tdplotsetmaincoords{70}{20}
          begin{tikzpicture}[tdplot_main_coords]
          % draw[-stealth] (0,0,0) -- (2,0,0) node[pos=1.1]{$x$};
          % draw[-stealth] (0,0,0) -- (0,2,0) node[pos=1.1]{$y$};
          foreach X [count=Y] in {gerbla,gerred,geryel}
          {shade[left color=X,right color=X!70!black,middle color=X!70!white]
          plot[variable=x,domain=0:2] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=2:0] (x,{0.2*sin(x*90)},3-Y);
          shade[left color=X!70!black,right color=X,middle color=X!70!white]
          plot[variable=x,domain=2:4] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=4:2] (x,{0.2*sin(x*90)},3-Y);}
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer


























          • I'm afraid this only answers the bonus question, for flags of Germany, Netherlands, etc. only. How can it deal with, for example, the US flag?

            – JouleV
            Apr 6 at 3:57






          • 1





            @JouleV It does work if you set transform shape nonlinear=true.

            – marmot
            2 days ago






          • 1





            @marmot One word: perfect! Thanks you very much!!!!!

            – JouleV
            2 days ago






          • 1





            @BlackMild I quickly added something, surely it can be improved.

            – marmot
            2 days ago






          • 1





            @JouleV OK OK, I give in. Now it is attached to some post. ;-)

            – marmot
            2 days ago


















          15














          You can use nonlinear transformations to achieve this effect.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{GermanFlag}{%
          fill[gerbla] (0,2) rectangle (4,3);
          fill[gerred] (0,1) rectangle (4,2);
          fill[geryel] (0,0) rectangle (4,1);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=1]
          begin{scope}[local bounding box=linear]
          GermanFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          GermanFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (2,3);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (2,0) rectangle (4,3);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          Of course, this works with any flag you have the TikZ code for, including of course your nice US flag.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[local bounding box=linear]
          USFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=2.5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          And here is something for Black Mild.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          tikzdeclarecoordinatesystem{flag}{% https://tex.stackexchange.com/a/434247/121799
          tikz@scan@one@pointrelax(#1)
          flagtransformation
          }
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          foreach X in {0,5,...,95}
          {begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[xshift=X pt,
          local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          shade[left color=gray,right color=gray!70,middle color=gray!20]
          (0,1.05) rectangle ++ (-0.1,-3);
          end{scope}
          end{tikzpicture}}
          end{document}


          enter image description here



          This answer has the codes for many flags, out of which I picked Iceland. (Note that if the flag contains shapes, you need to say transform shape nonlinear=true.) The shading can be added on top.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          definecolor{SkyBlue}{rgb}{0.00784314,0.32156864,0.61176473}
          definecolor{FireRed}{rgb}{0.86274511,0.11764706,0.20784314}
          newcommandIcelandFlag{
          fill[SkyBlue] (0,0) rectangle (25,18);
          fill[white] (7,0) rectangle (11,18);
          fill[white] (0,7) rectangle (25,11);
          fill[FireRed] (8,0) rectangle (10,18);
          fill[FireRed] (0,8) rectangle (25,10);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=0.15]
          begin{scope}[local bounding box=linear]
          IcelandFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=35cm,local bounding box=nonlinear]
          pgftransformnonlinear{flagtransformation}
          IcelandFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (12.5,18);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (12.5,0) rectangle (25,18);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          In order to draw a 3d flag, you may use tikz-3dplot.
          With shade you can get something like this.



          documentclass[tikz]{standalone}
          usepackage{tikz-3dplot}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          begin{document}
          tdplotsetmaincoords{70}{20}
          begin{tikzpicture}[tdplot_main_coords]
          % draw[-stealth] (0,0,0) -- (2,0,0) node[pos=1.1]{$x$};
          % draw[-stealth] (0,0,0) -- (0,2,0) node[pos=1.1]{$y$};
          foreach X [count=Y] in {gerbla,gerred,geryel}
          {shade[left color=X,right color=X!70!black,middle color=X!70!white]
          plot[variable=x,domain=0:2] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=2:0] (x,{0.2*sin(x*90)},3-Y);
          shade[left color=X!70!black,right color=X,middle color=X!70!white]
          plot[variable=x,domain=2:4] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=4:2] (x,{0.2*sin(x*90)},3-Y);}
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer


























          • I'm afraid this only answers the bonus question, for flags of Germany, Netherlands, etc. only. How can it deal with, for example, the US flag?

            – JouleV
            Apr 6 at 3:57






          • 1





            @JouleV It does work if you set transform shape nonlinear=true.

            – marmot
            2 days ago






          • 1





            @marmot One word: perfect! Thanks you very much!!!!!

            – JouleV
            2 days ago






          • 1





            @BlackMild I quickly added something, surely it can be improved.

            – marmot
            2 days ago






          • 1





            @JouleV OK OK, I give in. Now it is attached to some post. ;-)

            – marmot
            2 days ago
















          15












          15








          15







          You can use nonlinear transformations to achieve this effect.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{GermanFlag}{%
          fill[gerbla] (0,2) rectangle (4,3);
          fill[gerred] (0,1) rectangle (4,2);
          fill[geryel] (0,0) rectangle (4,1);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=1]
          begin{scope}[local bounding box=linear]
          GermanFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          GermanFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (2,3);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (2,0) rectangle (4,3);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          Of course, this works with any flag you have the TikZ code for, including of course your nice US flag.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[local bounding box=linear]
          USFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=2.5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          And here is something for Black Mild.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          tikzdeclarecoordinatesystem{flag}{% https://tex.stackexchange.com/a/434247/121799
          tikz@scan@one@pointrelax(#1)
          flagtransformation
          }
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          foreach X in {0,5,...,95}
          {begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[xshift=X pt,
          local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          shade[left color=gray,right color=gray!70,middle color=gray!20]
          (0,1.05) rectangle ++ (-0.1,-3);
          end{scope}
          end{tikzpicture}}
          end{document}


          enter image description here



          This answer has the codes for many flags, out of which I picked Iceland. (Note that if the flag contains shapes, you need to say transform shape nonlinear=true.) The shading can be added on top.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          definecolor{SkyBlue}{rgb}{0.00784314,0.32156864,0.61176473}
          definecolor{FireRed}{rgb}{0.86274511,0.11764706,0.20784314}
          newcommandIcelandFlag{
          fill[SkyBlue] (0,0) rectangle (25,18);
          fill[white] (7,0) rectangle (11,18);
          fill[white] (0,7) rectangle (25,11);
          fill[FireRed] (8,0) rectangle (10,18);
          fill[FireRed] (0,8) rectangle (25,10);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=0.15]
          begin{scope}[local bounding box=linear]
          IcelandFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=35cm,local bounding box=nonlinear]
          pgftransformnonlinear{flagtransformation}
          IcelandFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (12.5,18);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (12.5,0) rectangle (25,18);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          In order to draw a 3d flag, you may use tikz-3dplot.
          With shade you can get something like this.



          documentclass[tikz]{standalone}
          usepackage{tikz-3dplot}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          begin{document}
          tdplotsetmaincoords{70}{20}
          begin{tikzpicture}[tdplot_main_coords]
          % draw[-stealth] (0,0,0) -- (2,0,0) node[pos=1.1]{$x$};
          % draw[-stealth] (0,0,0) -- (0,2,0) node[pos=1.1]{$y$};
          foreach X [count=Y] in {gerbla,gerred,geryel}
          {shade[left color=X,right color=X!70!black,middle color=X!70!white]
          plot[variable=x,domain=0:2] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=2:0] (x,{0.2*sin(x*90)},3-Y);
          shade[left color=X!70!black,right color=X,middle color=X!70!white]
          plot[variable=x,domain=2:4] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=4:2] (x,{0.2*sin(x*90)},3-Y);}
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer















          You can use nonlinear transformations to achieve this effect.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{GermanFlag}{%
          fill[gerbla] (0,2) rectangle (4,3);
          fill[gerred] (0,1) rectangle (4,2);
          fill[geryel] (0,0) rectangle (4,1);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=1]
          begin{scope}[local bounding box=linear]
          GermanFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          GermanFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (2,3);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (2,0) rectangle (4,3);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          Of course, this works with any flag you have the TikZ code for, including of course your nice US flag.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[local bounding box=linear]
          USFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=2.5cm,local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          And here is something for Black Mild.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shapes}
          usepgfmodule{nonlineartransformations}
          definecolor{usblue}{rgb}{.234,.233,.430}
          definecolor{usared}{rgb}{.698,.132,.203}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          tikzdeclarecoordinatesystem{flag}{% https://tex.stackexchange.com/a/434247/121799
          tikz@scan@one@pointrelax(#1)
          flagtransformation
          }
          makeatother
          newcommand{USFlag}{%
          fill[usared] (0,0) rectangle (1.9,1);
          foreach i in {1,3,...,11}
          fill[white] (0,i/13) rectangle (1.9,{(i+1)/13});
          fill [usblue] (0,6/13) rectangle ({1.9*2/5},1);
          foreach i in {1,2,3,4,5,6} {
          foreach j in {1,2,3,4,5} {
          node[star,star points=5,star point ratio=2.25,fill=white,
          minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i-(1.9/30)},{6/13+(7/130)+(7*(j-1)/65)}) {};
          }
          }
          foreach i in {1,2,3,4,5} {
          foreach j in {1,2,3,4} {
          node[star,star points=5,star point ratio=2.25,fill=white,minimum size=0.0616cm,inner sep=0pt] at ({(1.9/15)*i},{6/13+(7*j/65)}) {};
          }
          }}
          begin{document}
          foreach X in {0,5,...,95}
          {begin{tikzpicture}[font=sffamily,scale=2,transform shape]
          begin{scope}[xshift=X pt,
          local bounding box=nonlinear,transform shape
          nonlinear=true]
          pgftransformnonlinear{flagtransformation}
          USFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (0.95,1);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0.95,0) rectangle (1.9,1);
          shade[left color=gray,right color=gray!70,middle color=gray!20]
          (0,1.05) rectangle ++ (-0.1,-3);
          end{scope}
          end{tikzpicture}}
          end{document}


          enter image description here



          This answer has the codes for many flags, out of which I picked Iceland. (Note that if the flag contains shapes, you need to say transform shape nonlinear=true.) The shading can be added on top.



          documentclass[tikz,border=3.14mm]{standalone}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defflagtransformation{%
          pgf@xa=pgf@x%
          pgf@ya=pgf@y%
          %typeout{oldspace x=pgf@xaspace old space y=pgf@ya}%
          pgfmathsetmacro{myy}{pgf@ya+7*sin(pgf@xa*3.6)-0.1*pgf@xa}%
          %typeout{atspace x=thepgf@xa:space newspace y=myy}%
          pgf@y=myy pt}
          makeatother
          definecolor{SkyBlue}{rgb}{0.00784314,0.32156864,0.61176473}
          definecolor{FireRed}{rgb}{0.86274511,0.11764706,0.20784314}
          newcommandIcelandFlag{
          fill[SkyBlue] (0,0) rectangle (25,18);
          fill[white] (7,0) rectangle (11,18);
          fill[white] (0,7) rectangle (25,11);
          fill[FireRed] (8,0) rectangle (10,18);
          fill[FireRed] (0,8) rectangle (25,10);}
          begin{document}
          begin{tikzpicture}[font=sffamily,scale=0.15]
          begin{scope}[local bounding box=linear]
          IcelandFlag
          end{scope}
          node[anchor=south] (lin) at (linear.north){linear};
          begin{scope}[xshift=35cm,local bounding box=nonlinear]
          pgftransformnonlinear{flagtransformation}
          IcelandFlag
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (0,0) rectangle (12.5,18);
          shade[left color=black,right color=black,middle color=white,opacity=0.15]
          (12.5,0) rectangle (25,18);
          end{scope}
          node[anchor=south] at (lin.south-|nonlinear.north){nonlinear};
          end{tikzpicture}
          end{document}


          enter image description here



          In order to draw a 3d flag, you may use tikz-3dplot.
          With shade you can get something like this.



          documentclass[tikz]{standalone}
          usepackage{tikz-3dplot}
          definecolor{gerbla}{RGB}{0,0,0}
          definecolor{gerred}{RGB}{255,0,0}
          definecolor{geryel}{RGB}{255,204,0}
          begin{document}
          tdplotsetmaincoords{70}{20}
          begin{tikzpicture}[tdplot_main_coords]
          % draw[-stealth] (0,0,0) -- (2,0,0) node[pos=1.1]{$x$};
          % draw[-stealth] (0,0,0) -- (0,2,0) node[pos=1.1]{$y$};
          foreach X [count=Y] in {gerbla,gerred,geryel}
          {shade[left color=X,right color=X!70!black,middle color=X!70!white]
          plot[variable=x,domain=0:2] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=2:0] (x,{0.2*sin(x*90)},3-Y);
          shade[left color=X!70!black,right color=X,middle color=X!70!white]
          plot[variable=x,domain=2:4] (x,{0.2*sin(x*90)},4-Y)
          --
          plot[variable=x,domain=4:2] (x,{0.2*sin(x*90)},3-Y);}
          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered Apr 6 at 3:45









          marmotmarmot

          116k5147277




          116k5147277













          • I'm afraid this only answers the bonus question, for flags of Germany, Netherlands, etc. only. How can it deal with, for example, the US flag?

            – JouleV
            Apr 6 at 3:57






          • 1





            @JouleV It does work if you set transform shape nonlinear=true.

            – marmot
            2 days ago






          • 1





            @marmot One word: perfect! Thanks you very much!!!!!

            – JouleV
            2 days ago






          • 1





            @BlackMild I quickly added something, surely it can be improved.

            – marmot
            2 days ago






          • 1





            @JouleV OK OK, I give in. Now it is attached to some post. ;-)

            – marmot
            2 days ago





















          • I'm afraid this only answers the bonus question, for flags of Germany, Netherlands, etc. only. How can it deal with, for example, the US flag?

            – JouleV
            Apr 6 at 3:57






          • 1





            @JouleV It does work if you set transform shape nonlinear=true.

            – marmot
            2 days ago






          • 1





            @marmot One word: perfect! Thanks you very much!!!!!

            – JouleV
            2 days ago






          • 1





            @BlackMild I quickly added something, surely it can be improved.

            – marmot
            2 days ago






          • 1





            @JouleV OK OK, I give in. Now it is attached to some post. ;-)

            – marmot
            2 days ago



















          I'm afraid this only answers the bonus question, for flags of Germany, Netherlands, etc. only. How can it deal with, for example, the US flag?

          – JouleV
          Apr 6 at 3:57





          I'm afraid this only answers the bonus question, for flags of Germany, Netherlands, etc. only. How can it deal with, for example, the US flag?

          – JouleV
          Apr 6 at 3:57




          1




          1





          @JouleV It does work if you set transform shape nonlinear=true.

          – marmot
          2 days ago





          @JouleV It does work if you set transform shape nonlinear=true.

          – marmot
          2 days ago




          1




          1





          @marmot One word: perfect! Thanks you very much!!!!!

          – JouleV
          2 days ago





          @marmot One word: perfect! Thanks you very much!!!!!

          – JouleV
          2 days ago




          1




          1





          @BlackMild I quickly added something, surely it can be improved.

          – marmot
          2 days ago





          @BlackMild I quickly added something, surely it can be improved.

          – marmot
          2 days ago




          1




          1





          @JouleV OK OK, I give in. Now it is attached to some post. ;-)

          – marmot
          2 days ago







          @JouleV OK OK, I give in. Now it is attached to some post. ;-)

          – marmot
          2 days ago




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483459%2fhow-to-draw-a-waving-flag-in-tikz%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Færeyskur hestur Heimild | Tengill | Tilvísanir | LeiðsagnarvalRossið - síða um færeyska hrossið á færeyskuGott ár hjá færeyska hestinum

          He _____ here since 1970 . Answer needed [closed]What does “since he was so high” mean?Meaning of “catch birds for”?How do I ensure “since” takes the meaning I want?“Who cares here” meaningWhat does “right round toward” mean?the time tense (had now been detected)What does the phrase “ring around the roses” mean here?Correct usage of “visited upon”Meaning of “foiled rail sabotage bid”It was the third time I had gone to Rome or It is the third time I had been to Rome

          Slayer Innehåll Historia | Stil, komposition och lyrik | Bandets betydelse och framgångar | Sidoprojekt och samarbeten | Kontroverser | Medlemmar | Utmärkelser och nomineringar | Turnéer och festivaler | Diskografi | Referenser | Externa länkar | Navigeringsmenywww.slayer.net”Metal Massacre vol. 1””Metal Massacre vol. 3””Metal Massacre Volume III””Show No Mercy””Haunting the Chapel””Live Undead””Hell Awaits””Reign in Blood””Reign in Blood””Gold & Platinum – Reign in Blood””Golden Gods Awards Winners”originalet”Kerrang! Hall Of Fame””Slayer Looks Back On 37-Year Career In New Video Series: Part Two””South of Heaven””Gold & Platinum – South of Heaven””Seasons in the Abyss””Gold & Platinum - Seasons in the Abyss””Divine Intervention””Divine Intervention - Release group by Slayer””Gold & Platinum - Divine Intervention””Live Intrusion””Undisputed Attitude””Abolish Government/Superficial Love””Release “Slatanic Slaughter: A Tribute to Slayer” by Various Artists””Diabolus in Musica””Soundtrack to the Apocalypse””God Hates Us All””Systematic - Relationships””War at the Warfield””Gold & Platinum - War at the Warfield””Soundtrack to the Apocalypse””Gold & Platinum - Still Reigning””Metallica, Slayer, Iron Mauden Among Winners At Metal Hammer Awards””Eternal Pyre””Eternal Pyre - Slayer release group””Eternal Pyre””Metal Storm Awards 2006””Kerrang! Hall Of Fame””Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Bullet-For My Valentine booed at Metal Hammer Golden Gods Awards””Unholy Aliance””The End Of Slayer?””Slayer: We Could Thrash Out Two More Albums If We're Fast Enough...””'The Unholy Alliance: Chapter III' UK Dates Added”originalet”Megadeth And Slayer To Co-Headline 'Canadian Carnage' Trek”originalet”World Painted Blood””Release “World Painted Blood” by Slayer””Metallica Heading To Cinemas””Slayer, Megadeth To Join Forces For 'European Carnage' Tour - Dec. 18, 2010”originalet”Slayer's Hanneman Contracts Acute Infection; Band To Bring In Guest Guitarist””Cannibal Corpse's Pat O'Brien Will Step In As Slayer's Guest Guitarist”originalet”Slayer’s Jeff Hanneman Dead at 49””Dave Lombardo Says He Made Only $67,000 In 2011 While Touring With Slayer””Slayer: We Do Not Agree With Dave Lombardo's Substance Or Timeline Of Events””Slayer Welcomes Drummer Paul Bostaph Back To The Fold””Slayer Hope to Unveil Never-Before-Heard Jeff Hanneman Material on Next Album””Slayer Debut New Song 'Implode' During Surprise Golden Gods Appearance””Release group Repentless by Slayer””Repentless - Slayer - Credits””Slayer””Metal Storm Awards 2015””Slayer - to release comic book "Repentless #1"””Slayer To Release 'Repentless' 6.66" Vinyl Box Set””BREAKING NEWS: Slayer Announce Farewell Tour””Slayer Recruit Lamb of God, Anthrax, Behemoth + Testament for Final Tour””Slayer lägger ner efter 37 år””Slayer Announces Second North American Leg Of 'Final' Tour””Final World Tour””Slayer Announces Final European Tour With Lamb of God, Anthrax And Obituary””Slayer To Tour Europe With Lamb of God, Anthrax And Obituary””Slayer To Play 'Last French Show Ever' At Next Year's Hellfst””Slayer's Final World Tour Will Extend Into 2019””Death Angel's Rob Cavestany On Slayer's 'Farewell' Tour: 'Some Of Us Could See This Coming'””Testament Has No Plans To Retire Anytime Soon, Says Chuck Billy””Anthrax's Scott Ian On Slayer's 'Farewell' Tour Plans: 'I Was Surprised And I Wasn't Surprised'””Slayer””Slayer's Morbid Schlock””Review/Rock; For Slayer, the Mania Is the Message””Slayer - Biography””Slayer - Reign In Blood”originalet”Dave Lombardo””An exclusive oral history of Slayer”originalet”Exclusive! Interview With Slayer Guitarist Jeff Hanneman”originalet”Thinking Out Loud: Slayer's Kerry King on hair metal, Satan and being polite””Slayer Lyrics””Slayer - Biography””Most influential artists for extreme metal music””Slayer - Reign in Blood””Slayer guitarist Jeff Hanneman dies aged 49””Slatanic Slaughter: A Tribute to Slayer””Gateway to Hell: A Tribute to Slayer””Covered In Blood””Slayer: The Origins of Thrash in San Francisco, CA.””Why They Rule - #6 Slayer”originalet”Guitar World's 100 Greatest Heavy Metal Guitarists Of All Time”originalet”The fans have spoken: Slayer comes out on top in readers' polls”originalet”Tribute to Jeff Hanneman (1964-2013)””Lamb Of God Frontman: We Sound Like A Slayer Rip-Off””BEHEMOTH Frontman Pays Tribute To SLAYER's JEFF HANNEMAN””Slayer, Hatebreed Doing Double Duty On This Year's Ozzfest””System of a Down””Lacuna Coil’s Andrea Ferro Talks Influences, Skateboarding, Band Origins + More””Slayer - Reign in Blood””Into The Lungs of Hell””Slayer rules - en utställning om fans””Slayer and Their Fans Slashed Through a No-Holds-Barred Night at Gas Monkey””Home””Slayer””Gold & Platinum - The Big 4 Live from Sofia, Bulgaria””Exclusive! Interview With Slayer Guitarist Kerry King””2008-02-23: Wiltern, Los Angeles, CA, USA””Slayer's Kerry King To Perform With Megadeth Tonight! - Oct. 21, 2010”originalet”Dave Lombardo - Biography”Slayer Case DismissedArkiveradUltimate Classic Rock: Slayer guitarist Jeff Hanneman dead at 49.”Slayer: "We could never do any thing like Some Kind Of Monster..."””Cannibal Corpse'S Pat O'Brien Will Step In As Slayer'S Guest Guitarist | The Official Slayer Site”originalet”Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Kerrang! Awards 2006 Blog: Kerrang! Hall Of Fame””Kerrang! Awards 2013: Kerrang! Legend”originalet”Metallica, Slayer, Iron Maien Among Winners At Metal Hammer Awards””Metal Hammer Golden Gods Awards””Bullet For My Valentine Booed At Metal Hammer Golden Gods Awards””Metal Storm Awards 2006””Metal Storm Awards 2015””Slayer's Concert History””Slayer - Relationships””Slayer - Releases”Slayers officiella webbplatsSlayer på MusicBrainzOfficiell webbplatsSlayerSlayerr1373445760000 0001 1540 47353068615-5086262726cb13906545x(data)6033143kn20030215029