\chapter{Streamtubes}

The last of the non-optional assignments, just as the height plots, a 3-dimensional assignment. Streamlines and streamtubes can also however be used in 2D grids if needed. \\

\section{Description}

Imagine dropping of bit of ink into the fluid and let it flow for a while. This will result in a line that shows the path a ink particle has taken. Such a path is called a streamline. A streamtube is a 3D variant of a streamline. It consists of a number of consecutive tubes that together form a thick 3-dimensional tube. \\

Each streamtube has a begining and an end. The starting point of a streamtube is called a seedpoint. From this seedpoint the tube will begin flowing with the fluid. It ends after a number of frames. \\

The implemented streamtubes initially were not actually flowing trough the fluid but through a frame history. Each frame's velocity or force vector components are stored in a history array and the streamtubes take a path trough this history. The 2D grid became a 3D grid with this new feature. \\

\section{Implementation}

Firstly the seedpoint placement was implemented. The user is able to pick an exact position for a seedpoint by with the mouse. A seedpoint is rendered as a small sphere. \\

Tracing the streamtubes was possible by going through a frame and getting the velocity or force vector components and calculating it's possition in the previous, stored, frame. By doing so streamlines visible. Using configureable cylinders rather then lines streamtubes where born. \\

\section{Difficulties}

Since time was becoming an issue, the implementation of streamtubes is most likly still buggy and might not be fully correct. \\
