[Tex/LaTex] Create diagrams in LaTeX with TikZ

diagramstikz-pgf

I am relatively new to the concept of generating diagrams in LaTeX, and do not know if LaTeX is capable of generating the diagram i wish to create. The diagram looks like this:

enter image description here

I was hoping someone could point me in the right direction as to how I would go around creating a diagram like this. FYI this was generated in Powerpoint, and when I insert it as an image in LaTeX, the resolution is very poor, also I would eventually like to add some text to the diagram. I have started using TikZ, and am learning a lot as I read through the manual, but I cant see how I can create diagrams like the one shown here.

Edited:
Eventually I wish to add some text on the diagram showing some of the processes that occur within the water column. At the moment I have simply generated the features of the diagram individually i.e. create a sine wave for the surface, used 'tension' for the shape of the lake, and then connect these together with straight lines. It just seems that the method that I'm adopting is rather long winded, and wont end up producing a nice outcome.

Best Answer

Update: Improved code, and explanations and more examples added (after the first figure).

This is a "craftsman" solution, in which I fine-tuned a bit the control points for the bottom of the pit.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing,calc}
\begin{document}
\usetikzlibrary{decorations.pathmorphing,calc}
\begin{tikzpicture}
% Define some reference points 
% The figure is drawn a bit bigger, and then clipped to the following dimensions:
\coordinate (clipping area) at (10, 7);
\clip (0,0) rectangle (clipping area);

% Next reference points are relative to the lower left corner of the clipping area
\coordinate (water level) at (0, 6);
\coordinate (bottom)      at (5, 1.3);     % (bottom of the pit)
\coordinate (ground1)     at (0, 5);       % (left shore)
\coordinate (ground2)     at (10, 5);      % (right shore)

% Coordinates of the bigger area really drawn
\coordinate (lower left)  at ([xshift=-5mm, yshift=-5mm] 0,0);
\coordinate (upper right) at ([xshift=5mm,  yshift=5mm] clipping area);

% Draw the water and ripples
\draw [draw=blue!80!black, decoration={bumps, mirror, segment length=6mm}, decorate,
     bottom color=cyan!60!black, top color=blue!20!white] 
  (lower left) rectangle (water level-|upper right);

% Draw the ground
\draw [draw=brown!30!black, fill=brown] 
  (lower left) -- (lower left|-ground1)  --
  (ground1) .. controls ($(ground1)!.3!(bottom)$) and (bottom-|ground1) ..
  (bottom) .. controls (bottom-|ground2) and ($(ground2)!.3!(bottom)$) .. 
  (ground2) -- (ground2-|upper right) -- (lower left-|upper right) -- cycle;

% \draw[dotted](0,0) rectangle (clipping area);

\end{tikzpicture}
\end{document}

Result:

Water and ground

Some explanations:

  • The figure is drawn bigger than the area shown, then it was clipped . This makes easier to draw the water and to remove the borders of the ground. In order to clarify this, you can reveal the clipping area by removing the line starting with \clip and adding at the end of the figure the line:

    \draw[dotted](0,0) rectangle (clipping area);
    

    You'll get:

    Clipping area

  • I made great use of intersection coordinate system, i.e.: the syntax (node1|-node2), meaning "the coordinate located at the vertical of node1 and the horizontal of node2, that is, located at (node1.x, node2.y) (if this syntax were possible in tikz)

  • I defined a number of "reference points" to make easier the customization of the figure. For example, the figure can be made assymetrical changing the y coordinate of ground2, For example:

    \coordinate (ground2)     at (10, 3);      % (right shore)
    

    (See the result after the following bullet)

  • The origin (0,0) is located at the lower left corner of the clipping area, so that it is easier to add labels at specified points, but you can also use the named coordinates (bottom), (water level) and so on, and use relative coordinates to achieve greater simplicity and flexibility. For example:

    \draw[>=stealth, <->] (bottom) -- (bottom|-water level) node[right, midway] {7m};
    \draw[>=stealth, <-] ([shift={(-3mm,-8mm)}] ground2) -- +(-1,2) node[above] {Plateau};
    

    The result of adding these lines (and also changing the vertical position of (ground2) is the following:

    Result