Book Image

OpenGL Data Visualization Cookbook

Book Image

OpenGL Data Visualization Cookbook

Overview of this book

OpenGL is a great multi-platform, cross-language, and hardware-accelerated graphics interface for visualizing large 2D and 3D datasets. Data visualization has become increasingly challenging using conventional approaches as datasets become larger and larger, especially with the Big Data evolution. From a mobile device to a sophisticated high-performance computing cluster, OpenGL libraries provide developers with an easy-to-use interface to create stunning visuals in 3D in real time for a wide range of interactive applications. This book provides a series of easy-to-follow, hands-on tutorials to create appealing OpenGL-based visualization tools with minimal development time. We will first illustrate how to quickly set up the development environment in Windows, Mac OS X, and Linux. Next, we will demonstrate how to visualize data for a wide range of applications using OpenGL, starting from simple 2D datasets to increasingly complex 3D datasets with more advanced techniques. Each chapter addresses different visualization problems encountered in real life and introduces the relevant OpenGL features and libraries in a modular fashion. By the end of this book, you will be equipped with the essential skills to develop a wide range of impressive OpenGL-based applications for your unique data visualization needs, on platforms ranging from conventional computers to the latest mobile/wearable devices.
Table of Contents (16 chapters)
OpenGL Data Visualization Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

2D visualization of 3D/4D datasets


We have now learned multiple methods to generate plots on screen using points and lines. In the last section, we will demonstrate how to visualize a million data points in a 3D dataset using OpenGL in real time. A common strategy to visualize a complex 3D dataset is to encode the third dimension (for example, the z dimension) in the form of a heat map with a desirable color scheme. As an example, we show a heat map of a 2D Gaussian function with its height z, encoded using a simple color scheme. In general, a 2-D Gaussian function, , is defined as follows:

Here, A is the amplitude () of the distribution centered at and are the standard deviations (spread) of the distribution in the x and y directions. To make this demo more interesting and more visually appealing, we vary the standard deviation or sigma term (equally in the x and y directions) over time. Indeed, we can apply the same method to visualize very complex 3D datasets.

Getting ready

By now, you...