Real time visualization of 3D vector field with CUDA
This project demonstrates visualization techniques like glyphs, stream lines, stream tubes, and stream surfaces — all in real time. The key is RK4 integrator implemented in CUDA that is using very fast texture lookup functions to access a vector field. The vector field itself is stored as a 3D texture which enables to use hardware accelerated trilinear interpolation lookup functions. This article contains more than 100 images and figures, commented code snippets, and source code available for download.
School project, tags: C++, CUDA, OpenGL
GitHub repository: NightElfik/Vector-field-visualization-using-cuda
Figure 1: Various images from this project.
1 Introduction
Vector field visualization is special case of flow visualization where the flow is "frozen" (in time). Such a "frozen" fluid flow can be represented as vector field which gives us information about the speed and direction of the fluid in any given point. For practical reasons we usually have only finite number samples within observed volume and vector in arbitrary location is computed using some kind of interpolation. Flow visualizations are important all kinds of engineering like airplane or car design.
The topic of this project is visualization of vector field using various techniques like stream lines, stream tubes, stream surfaces and glyphs. This project was final assignment in Introduction to Scientific Visualization class (CS 530). The assignment was meant to be implemented using open-source library called Visualization Toolkit (VTK) but I decided to implement it completely from scratch hoping that I will learn a lot of new things which turned out to be very true. Also, my implementation uses CUDA for acceleration of computation on GPU to achieve interactivity.