I have redefined the \headrule to include part of the the Koch Snowflake from the \usetikzlibrary{decorations.fractals} package. Here is my code and a screenshot:
\documentclass[10pt]{article}
\usepackage{fancyhdr}
\usepackage{tikz}
\usetikzlibrary{decorations.fractals}
\renewcommand\headrule{%
\vspace{-0.75in}
\hrulefill
{\tikz[decoration=Koch snowflake]{\draw decorate{ decorate{ decorate{ (0,-2) -- (3,-2) }}};}}
}
\fancypagestyle{firstpage}{
\fancyhead[L]{Name:}
\fancyhead[C]{Period:}
}
\begin{document}
\thispagestyle{firstpage}
First Page
\end{document}
My goal is to have the nth iteration of the snowflake corresponding with the nth page of my document (My document will only be around 5-6 pages). My idea is to use some type of for loop to do this. I'm imagining something similar to this, where I am redefining the headrule for each page.
\foreach \x in {1,...,final page}{%
\renewcommand\headrule{%
%%something with koch snowflake here%%
}
}
I think I need the number of decoration commands to be equal to \thepage. I'm sure there is a way to do this, but I can't figure it out. Any help is appreciated!