答案1
我可能误解了这个问题,但按照我的理解,你只需要剪辑和较小的相对偏移。
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\newsavebox\DuckBox
\sbox\DuckBox{\begin{tikzpicture}[trig format=rad]
\fill[blue!20] plot[variable=\x,domain=0:10,samples=31,smooth]
(\x,{1.5+(1+0.5*rnd)*sin(\x)*sin(\x)}) |- (0,0);
\fill[blue!40] plot[variable=\x,domain=0:10,samples=61,smooth]
(\x,{1+(1+0.5*rnd)*sin(\x)*sin(\x)*sin(2*\x)*sin(2*\x)}) |- (0,0);
\fill[blue!60] plot[variable=\x,domain=0:10,samples=61,smooth]
(\x,{0.5+(1+0.5*rnd)*sin(\x)*sin(\x)*sin(2*\x)*sin(2*\x)}) |- (0,0);
\end{tikzpicture}}
\begin{document}
\begin{tikzpicture}
\foreach \X [count=\Y] in {pft,blub,bla,quack,meow}
{\begin{scope}
\clip (-5,\Y*0.52) rectangle (5,0.5+\Y*0.52);
\node[anchor=south] at (0,0.2+\Y*0.15) {\usebox\DuckBox};
\node[anchor=south west,font=\sffamily] at (-5,\Y*0.52) {\X};
\end{scope}}
\end{tikzpicture}
\end{document}
对于新版本的问题,答案本质上是相同的。
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\newsavebox\DuckBox
\sbox\DuckBox{\begin{tikzpicture}[trig format=rad]
\path[save path=\pathA] plot[variable=\x,domain=0:10,samples=151]
(\x,{-(1.2+0.5*rnd)*sin(1.15*\x-1)+0.5*sin(2*\x)+\x/3}) |- (0,0);
\foreach [count=\Y starting from 0] \X in
{blue!20,orange!20,orange!40,orange!60,orange!80}
{\begin{scope}
\clip (0,1.5*\Y-1.5) rectangle (10,1.5*\Y);
\fill[\X,use path=\pathA];
\end{scope}}
\end{tikzpicture}}
\begin{document}
\begin{tikzpicture}
\node[anchor=south west,outer sep=0pt,inner sep=0pt]
at (0,4) {\usebox\DuckBox};
\clip (0,0) rectangle (10,1.5);
\node[anchor=south west,outer sep=0pt,inner sep=0pt,yscale=-1]
at (0,1.5) {\usebox\DuckBox};
\foreach \Y in {1,...,4}
{\node[anchor=south west,outer sep=0pt,inner sep=0pt]
at (0,-1.5*\Y) {\usebox\DuckBox};
}
\end{tikzpicture}
\end{document}