강에 대한 울타리

강에 대한 울타리

다음 다이어그램을 어떻게 만들 수 있습니까? 문제는 강을 만드는 것이다.

여기에 이미지 설명을 입력하세요

답변1

여기에 임의의 강이 있습니다. \pgfmathsetseed다른 강으로 변경하세요 .

여기에 이미지 설명을 입력하세요

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}
\begin{tikzpicture}
\fill[lime!70!olive](0,0)rectangle(8,4);
\clip(0,0)rectangle(8,4);
\draw[red, very thick, text=black](2,1)--node[above left]{$x$}(2,3)--node[above]{$y$}(6,3)--node[above right]{$x$}(6,1);
\pgfmathsetseed{14159}
\draw[decorate, decoration={random steps, segment length=3mm, amplitude=1pt}, lime!70!black, line width=.5mm, double=cyan!60!white, double distance=1cm](-1,1)--node[above=9mm, text=black]{A}(9,1);
\end{tikzpicture}
\end{document}

관련 정보