You are previewing OpenGL Data Visualization Cookbook.
O'Reilly logo
OpenGL Data Visualization Cookbook

Book Description

Over 35 hands-on recipes to create impressive, stunning visuals for a wide range of real-time, interactive applications using OpenGL

About This Book

  • Get acquainted with a set of fundamental OpenGL primitives and concepts that enable users to create stunning visuals of arbitrarily complex 2D and 3D datasets for many common applications
  • Explore interactive, real-time visualization of large 2D and 3D datasets or models, including the use of more advanced techniques such as stereoscopic 3D rendering.
  • Create stunning visuals on the latest platforms including mobile phones and state-of-the-art wearable computing devices
  • Who This Book Is For

    This book is aimed at anyone interested in creating impressive data visualization tools using modern graphics hardware. Whether you are a developer, engineer, or scientist, if you are interested in exploring the power of OpenGL for data visualization, this book is for you. While familiarity with C/C++ is recommended, no previous experience with OpenGL is assumed.

    What You Will Learn

  • Install, compile, and integrate the OpenGL pipeline into your own project
  • Create interactive applications using GLFW to handle user inputs and the Android Sensor framework to detect gestures and motions on mobile devices
  • Use OpenGL primitives to plot 2-D datasets such as time series dynamically
  • Render complex 3D volumetric datasets with techniques such as data slicers and multiple viewpoint projection
  • Render images, videos, and point cloud data from 3D range-sensing cameras using the OpenGL Shading Language (GLSL)
  • Develop video see-through augmented reality applications on mobile devices with OpenGL ES 3.0 and OpenCV
  • Visualize 3D models with meshes and surfaces using stereoscopic 3D technology
  • In Detail

    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.

    Style and approach

    This is an easy-to-follow, comprehensive Cookbook showing readers how to create an application with real-time, interactive data visualization in stereoscopic 3D. Each topic is explained in a step-by-step format. A range of hot topics is included, including data visualization on mobile and wearable platforms.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. OpenGL Data Visualization Cookbook
      1. Table of Contents
      2. OpenGL Data Visualization Cookbook
      3. Credits
      4. About the Authors
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Sections
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Getting Started with OpenGL
        1. Introduction
        2. Setting up a Windows-based development platform
          1. Installing Visual Studio 2013
          2. Getting ready
          3. How to do it...
          4. Installing CMake in Windows
          5. Getting ready
          6. How to do it…
        3. Setting up a Mac-based development platform
          1. Installing Xcode and command-line tools
          2. Getting ready
          3. How to do it...
          4. See also
          5. Installing MacPorts and CMake
          6. Getting ready
          7. How to do it...
        4. Setting up a Linux-based development platform
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Installing the GLFW library in Windows
          1. Getting ready
          2. How to do it...
        6. Installing the GLFW library in Mac OS X and Linux
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Creating your first OpenGL application with GLFW
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Compiling and running your first OpenGL application in Windows
          1. Getting ready
          2. How to do it...
        9. Compiling and running your first OpenGL application in Mac OS X or Linux
          1. Getting ready
          2. How to do it...
      9. 2. OpenGL Primitives and 2D Data Visualization
        1. Introduction
        2. OpenGL primitives
          1. Drawing points
          2. Getting ready
          3. How to do it…
          4. How it works…
          5. See also
          6. Drawing line segments
          7. Getting ready
          8. How to do it…
          9. How it works…
          10. Drawing triangles
          11. Getting ready
          12. How to do it…
          13. How it works…
        3. Creating a 2D plot using primitives
          1. Getting ready
          2. How to do it…
          3. How it works…
        4. Real-time visualization of time series
          1. Getting ready
          2. How to do it…
          3. How it works…
        5. 2D visualization of 3D/4D datasets
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
      10. 3. Interactive 3D Data Visualization
        1. Introduction
        2. Setting up a virtual camera for 3D rendering
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Creating a 3D plot with perspective rendering
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Creating an interactive environment with GLFW
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Rendering a volumetric dataset – MCML simulation
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      11. 4. Rendering 2D Images and Videos with Texture Mapping
        1. Introduction
        2. Getting started with modern OpenGL (3.2 or higher)
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Setting up the GLEW, GLM, SOIL, and OpenCV libraries in Windows
          1. Getting ready
          2. How to do it...
          3. See also
        4. Setting up the GLEW, GLM, SOIL, and OpenCV libraries in Mac OS X/Linux
          1. Getting ready
          2. How to do it...
          3. See also
        5. Creating your first vertex and fragment shader using GLSL
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Rendering 2D images with texture mapping
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Real-time video rendering with filters
          1. Getting ready
          2. How to do it...
          3. How it works...
      12. 5. Rendering of Point Cloud Data for 3D Range-sensing Cameras
        1. Introduction
        2. Getting started with the Microsoft Kinect (PrimeSense) 3D range-sensing camera
          1. How to do it...
          2. See also
        3. Capturing raw data from depth-sensing cameras
          1. How to do it...
          2. How it works...
        4. OpenGL point cloud rendering with texture mapping and overlays
          1. Getting ready
          2. How to do it...
          3. How it works...
      13. 6. Rendering Stereoscopic 3D Models using OpenGL
        1. Introduction
        2. Installing the Open Asset Import Library (Assimp)
          1. How to do it...
          2. See also
        3. Loading the first 3D model in the Wavefront Object (.obj) format
          1. How to do it...
          2. How it works...
        4. Rendering 3D models with points, lines, and triangles
          1. How to do it...
          2. How it works...
          3. See also
        5. Stereoscopic 3D rendering
          1. How to do it...
          2. How it works...
          3. See also
      14. 7. An Introduction to Real-time Graphics Rendering on a Mobile Platform using OpenGL ES 3.0
        1. Introduction
        2. Setting up the Android SDK
          1. How to do it...
          2. See also
        3. Setting up the Android Native Development Kit (NDK)
          1. How to do it...
          2. See also
        4. Developing a basic framework to integrate the Android NDK
          1. How to do it...
          2. How it works...
          3. See also
        5. Creating your first Android application with OpenGL ES 3.0
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      15. 8. Interactive Real-time Data Visualization on Mobile Devices
        1. Introduction
        2. Visualizing real-time data from built-in Inertial Measurement Units (IMUs)
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Part I – handling multi-touch interface and motion sensor inputs
          1. How to do it…
          2. How it works…
          3. See also
        4. Part II – interactive, real-time data visualization with mobile GPUs
          1. How to do it…
          2. How it works…
      16. 9. Augmented Reality-based Visualization on Mobile or Wearable Platforms
        1. Introduction
        2. Getting started I: Setting up OpenCV on Android
          1. Getting ready
          2. How to do it...
          3. See also
        3. Getting started II: Accessing the camera live feed using OpenCV
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Displaying real-time video using texture mapping
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Augmented reality-based data visualization over real-world scenes
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      17. Index