I want to create two irregular lines, one on top of each other, that follow the same pattern.
Following an answer from @vialrogo on the post Drawing randomly ragged lines in technical drawings I got this far, but I need that the lines are identical, irregular and appear one on top of each other.
Is there a way I can exactly duplicate random lines? Or is there any other code that will allow me to generate two irregular lines that will be equal but appear on top of each other?
\documentclass[]{standalone}
\usepackage{tikz} % To plot almost everything.
\usetikzlibrary{fit, calc, matrix, positioning, arrows.meta, intersections, through, backgrounds, patterns}
\usepackage{xparse}
\begin{document}
\begin{tikzpicture}
\NewDocumentCommand{\irregularline}{%
O {2mm} % Amplitude of irregularity. Optional. Default value = 2mm
m % First point
m % Second point
D <> {20} % Number of peaks. Optional. Default value = 20
}{{%
\coordinate (old) at #2;
\foreach \i in {1,2,...,#4}{
\draw (old) -- ($ ($#2!\i/(#4+1)!#3$) + (0,#1*rand) $) coordinate (old);
}
\draw (old) -- #3;
}}
\irregularline[1mm]{(0,0)}{(5,0)}
\irregularline[1mm]{(0,1)}{(5,1)}
\irregularline[1mm]{(0,1.5)}{(5,1.5)}
\end{tikzpicture}
\end{document}

