TikZ and FIFA WorldCup 2018: Flags of Nations

Some spy practice with completely off colors and shapes and ratios just to replicate a viral I've seen some time ago.

\documentclass[tikz]{standalone}
\usetikzlibrary{spy}
\definecolor{pantone 200}{RGB}{186,12,47}
\definecolor{pantone 280}{RGB}{0,32,91}
\begin{document}
\begin{tikzpicture}[spy using outlines={rectangle, magnification=4,width=11mm, height=8mm, connect spies}]
\fill[pantone 200] (0,0) rectangle (22mm,16mm);
\draw[white, line width=4mm] (0,8mm) -- ++(22mm,0) (8mm,0) -- ++(0mm,16mm);
\draw[pantone 280, line width=2mm] (0,8mm) -- ++(22mm,0) (8mm,0) -- ++(0mm,16mm);

\spy[draw=none] on (2mm,10mm) in node[label={[black, label distance=-2mm]90:IND}] at (-1.5,1.25);
\spy[draw=none] on (2mm,6mm) in node[label={[black, label distance=-2mm]90:POL}] at (-1.5,0);
\spy[draw=none] on (9.5mm,3mm) in node[label={[black, label distance=-2mm]90:FRA}] at (0,-1);
\spy[draw=none, magnification=3] on (12mm,9.5mm) in node[label={[black, label distance=-2mm]90:NLD}] at (3,1.25);
\spy[draw=none, magnification=2] on (8.5mm,8mm) in node[label={[black, label distance=-2mm]90:FIN}] at (1.2,2.5);
\spy[draw=none, magnification=1.5] on (18mm,8mm) in node[label={[black, label distance=-2mm]90:THA}] at (3,-0.5);

\end{tikzpicture}
\end{document}

enter image description here


Here is the Brazilian flag (high resolution PNG here).

enter image description here

Informations can be found in Wiki and about text positioning here.

\documentclass[border=0]{standalone}
\usepackage[scaled]{helvet}
\renewcommand\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{calc}

\definecolor{green} {RGB}{  0,156, 59}
\definecolor{yellow}{RGB}{255,223,  0}
\definecolor{blue}  {RGB}{  0, 39,118}

\newcommand{\wstar}[2]{%
  \fill[white]
  ($#1+(234:#2)$) --
  ($#1+( 90:#2)$) --
  ($#1+(306:#2)$) --
  ($#1+(162:#2)$) --
  ($#1+( 18:#2)$) --
  cycle;
}

\newcommand{\letter}[2][0]{%
  \rotatebox[origin=c]{#1}{%
    \resizebox{.3cm}{.33cm}{%
      \textcolor{green}{\textbf{#2}}%
}}}

\newcommand{\Eletter}[2][0]{%
  \rotatebox[origin=c]{#1}{%
    \resizebox{.25cm}{.3cm}{%
      \textcolor{green}{\textbf{#2}}%
}}}

\begin{document}
\begin{tikzpicture}[scale=1]

%% rectangle, losangle, circle
\fill[green]  (-10,-7) rectangle (10,7);
\fill[yellow] (0,-5.3) -- (-8.3,0) -- (0,5.3) -- (8.3,0) -- cycle;
\fill[blue]   (0,0)    circle    ( 3.5);

%% white band
\begin{scope}
    \clip        ( 0, 0) circle (3.5);
    \fill[white] (-2,-7) circle (8.5);
    \fill[blue]  (-2,-7) circle (8  );
\end{scope}

%% stars
\wstar{( 1.080, 1.100)}{0.15} % 1 Spica (α Virginis)
\wstar{(-2.860, 0.630)}{0.15} % 2 Procyon (α Canis Minoris)
\wstar{(-1.330,-0.140)}{0.12} % 3 Alphard (α Hydrae)
\wstar{( 0.950, 0.175)}{0.10} % 4 Dhanab al Shuja (γ Hydrae)
\wstar{(-2.550,-0.840)}{0.15} % 5 Sirius (α Canis Majoris)
\wstar{(-2.975,-1.155)}{0.12} % 6 Mirzam (β Canis Majoris)
\wstar{(-2.200,-0.630)}{0.07} % 7 Muliphen (γ Canis Majoris)
\wstar{(-1.820,-1.190)}{0.12} % 8 Wezen (δ Canis Majoris)
\wstar{(-1.920,-1.540)}{0.10} % 9 Adhara (ε Canis Majoris)
\wstar{(-1.405,-1.860)}{0.15} %10 Canopus (α Carinae)
\wstar{( 0.000,-0.560)}{0.12} %11 Gacrux (γ Crucis)
\wstar{(-0.351,-0.875)}{0.10} %12 Pálida (δ Crucis)
\wstar{(-0.175,-1.120)}{0.07} %13 Intrometida (ε Crucis)
\wstar{( 0.000,-1.575)}{0.15} %14 Acrux (α Crucis)
\wstar{( 0.407,-0.875)}{0.12} %15 Mimosa (β Crucis)
\wstar{( 2.455,-1.225)}{0.15} %16 Antares (α Scorpii)
\wstar{( 2.940,-1.260)}{0.10} %17 Graffias (β Scorpii)
\wstar{( 2.595,-1.535)}{0.12} %18 Wei (ε Scorpii)
\wstar{( 2.383,-1.822)}{0.12} %19 Shaula (λ Scorpii)
\wstar{( 2.100,-1.990)}{0.10} %20 Girtab (κ Scorpii)
\wstar{( 1.740,-1.930)}{0.10} %21 Denebakrab (μ Scorpii)
\wstar{( 1.755,-2.270)}{0.12} %22 Sargas (θ Scorpii)
\wstar{( 1.750,-2.625)}{0.10} %23 Apollyon (ι Scorpii)
\wstar{( 1.350,-2.050)}{0.10} %24 δ Trianguli Australis
\wstar{( 1.050,-2.356)}{0.12} %25 Atria (α Trianguli Australis)
\wstar{( 0.775,-1.960)}{0.10} %26 γ Trianguli Australis
\wstar{( 0.000,-2.740)}{0.05} %27 Polaris Australis (σ Octantis)

%% curved text 'ORDEM PROGRESSO'
\foreach \a/\l/\t in {%
  97.130000/O/ 7.130000,
  94.090000/R/ 4.090000,
  91.050000/D/ 1.050000,
  88.010000/E/-1.990000,
  84.970000/M/-5.030000,
%
  75.970000/P/-14.030000,
  72.846250/R/-17.153750,
  69.722500/O/-20.277500,
  66.598750/G/-23.401250,
  63.475000/R/-26.525000,
  60.351250/E/-29.648750,
  57.227500/S/-32.772500,
  54.103750/S/-35.896250,
  50.980000/O/-39.020000
}{%
  \node at ($(-2,-7)+(\a:8.25)$) {\letter[\t]{\l}};
}

%% curved text 'E' (smaller than other letters)
\foreach \a/\l/\t in {%
  80.470000/E/-9.530000
}{%
  \node at ($(-2,-7)+(\a:8.25)$) {\Eletter[\t]{\l}};
}

\end{tikzpicture}
\end{document}

Marmots support Iceland!

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[scale=0.5]
\definecolor{SkyBlue}{rgb}{0.00784314,0.32156864,0.61176473}
\fill[SkyBlue] (0,0) rectangle (25,18);
\fill[white] (7,0) rectangle (11,18);
\fill[white] (0,7) rectangle (25,11);
\definecolor{FireRed}{rgb}{0.86274511,0.11764706,0.20784314}
\fill[FireRed] (8,0) rectangle (10,18);
\fill[FireRed] (0,8) rectangle (25,10);
\end{tikzpicture}
\end{document}

enter image description here

UPDATE: Dimensions corrected! Big thanks to @Torbjørn T.!

The dimensions are (now) in agreement with official Iceland web site:

enter image description here

As pointed out by @ShreevatsaR, the width of a flag is not the analogue of a \textwidth, say, but the analogue of the \textheight. The dimensions there are consistent with my updated previous post, but much simpler, and have first been used in Jürgen G's answer. Really hope that this is the flag of the world cup winner in 2022! ;-)

Tags:

Tikz Pgf

Fun