# Drawing fluid pathlines, streaklines, streamlines using TikZ

I am trying to do a sketch of fluid pathlines, streaklines, and streamlines using TikZ. The code

\documentclass{minimal}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\fill [fill=blue!25] (0.0, 0.0) -- (0.0, 2.0) -- (6.0, 2.0) -- (6.0, 1.0) to[out=180, in=0] (0.0, 0.0);
\filldraw [semithick, fill=gray!50] (0.0, 2.0) rectangle (6.0, 2.1);
\filldraw [semithick, fill=gray!50] (0.0, -0.1) -- (0.0, 0.0) to[out=0, in=180] (6.0, 1.0) -- (6.0, 0.9) to[out=180, in=0] (0.0, -0.1);
%
\draw [thick] (0.25, 0.25) to[out=0, in=180] node [pos=0.1, above] {$t_{1}$} node [pos=0.5, above] {$t_{2}$} node [pos=0.9, above] {$t_{3}$} (5.75, 1.125);
\end{tikzpicture}
\end{document}


generates the following image:

I would like there to be closed circles on the black line at the locations under the labels $t_{1}$, $t_{2}$, and $t_{3}$. Can someone suggest how to do this? Thanks.

-
I would go with hobby, definitely. – Claudio Fiandrino Jan 29 '14 at 19:05

You can also just add extra nodes as you go, one for the filled circles, and one for the label:

## Code:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\fill [fill=blue!25] (0.0, 0.0) -- (0.0, 2.0) -- (6.0, 2.0) -- (6.0, 1.0) to[out=180, in=0] (0.0, 0.0);
\filldraw [semithick, fill=gray!50] (0.0, 2.0) rectangle (6.0, 2.1);
\filldraw [semithick, fill=gray!50] (0.0, -0.1) -- (0.0, 0.0) to[out=0, in=180] (6.0, 1.0) -- (6.0, 0.9) to[out=180, in=0] (0.0, -0.1);
%
\draw [thick] (0.25, 0.25) to[out=0, in=180]
node [pos=0.1, circle, fill=red, inner sep=2pt] {}
node [pos=0.1, above] {$t_{1}$}
node [pos=0.5, circle, fill=blue, inner sep=2pt] {}
node [pos=0.5, above] {$t_{2}$}
node [pos=0.9, circle, fill=orange, inner sep=2pt] {}
node [pos=0.9, above] {$t_{3}$} (5.75, 1.125);
\end{tikzpicture}
\end{document}

-
Thanks, Peter. I did not realize that I could create two nodes in the same physical location, such as you showed. This worked well. – Josh Jan 29 '14 at 23:14
@Josh: Glad it worked for you. Please see How do you accept an answer?. – Peter Grill Jan 29 '14 at 23:20

Specify coordinates inline rather than nodes. Then you can build up any constructs you require later on, like so:

\documentclass{minimal}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\fill [fill=blue!25] (0.0, 0.0) -- (0.0, 2.0) -- (6.0, 2.0) -- (6.0, 1.0) to[out=180, in=0] (0.0, 0.0);
\filldraw [semithick, fill=gray!50] (0.0, 2.0) rectangle (6.0, 2.1);
\filldraw [semithick, fill=gray!50] (0.0, -0.1) -- (0.0, 0.0)
to[out=0, in=180] (6.0, 1.0) -- (6.0, 0.9) to[out=180, in=0] (0.0, -0.1);
%
\draw [thick] (0.25, 0.25) to[out=0, in=180] coordinate[pos=0.1] (1)
coordinate[pos=0.5] (2)  coordinate[pos=0.9] (3) (5.75, 1.125);
\foreach \coord in {1,2,3}{%
\node[above] at (\coord) {$t_{\coord}$};
\fill (\coord) circle (2pt);
}
\end{tikzpicture}
\end{document}


Output is:

-