川沿いのフェンス

川沿いのフェンス

次の図をどのように作成すればよいでしょうか。問題は川を作ることです。

ここに画像の説明を入力してください

答え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}

関連情報