I would like to be able to draw, using TikZ, a picture as the one below, which consists of:
- two vertical line segments
- a wavy line going from the top point of the line segment on the left to the top point of the line segment on the right;
- a wavy line going from the bottom point of the line segment on the left to the bottom point of the line segment on the right.
Furthermore, I want to be able to fill this region with some color.
I did it using this code:
\begin{tikzpicture}
\filldraw[fill=cyan,domain=0:2,samples=100]
plot(\x,{(\x)^3-3*(\x)^2+2*\x})
--plot({2-\x},{(2-\x)/(1+(2-\x)^2)-2})--cycle;
\end{tikzpicture}
What bothers me was the need of finding two concrete curves in order to obtain the wavy lines. I think that I should be able to get them using something similar to the rounded corners
option of the draw
command. Is it possible?