LU Visualisierung, WS 09/10
Jan Beneš & Hrvoje Ribičić

Programming documentation

This document is meant as a short introduction into the application's internals. It should be an easy and short read for those who'd like to modify/enhance the application.

The application is written using the Qt library, OpenGL and uses Cg shader language for it's shaders. MSVC 2008 has been used as the development platform, and the application has been successfully tested under Windows XP with a GeForce 9300M GS card.

The RendererWidget - an OpenGL-enabled control - is where most of the interesting stuff happens.

The FlowVis framework was improved in several way. First of all, the lookup has been changed from a bruteforce approach to a floating-point lookup table. It's not rocket-fast, but it's decent. Second of all, bilinear filtering for the sampling has been added, and lastly, the interpolation function has been changed to allow to fetch the interpolation data first and then use it for subsequent interpolation of the other channels, so that it doesn't have to be done several times.

Another class has been addded that takes care of the data in other spaces, see FlowGrid's doxygen documentation for more details.

We implemented a regular grid in the Reggrid class that takes care of collision detection for evenly spaced streamlines. It's internals are described in it's doxygen in quite a lot of detail.

Streamlines are stored separately as a list of points to faciliate faster drawing.

The evenly spaced streamlines use the following algorithm: A point is placed in the center of the map and from it, the first streamline is generated. Each line fragment generates two seed points, who are immediately removed if colliding. The propagation of the streamline continues until it reaches the end of the screen or a location with velocity 0, or until a maximum number of line segments are created. A suitable candidate is selected from the remainder of the seed points and the process continues. The value dTest is used to test distance when adding new points and the value dSep is used to check if the seed points are too close. A regular grid with cell size dSep is used to efficiently check which points are too close to already generated lines.