Introduction
OpenGL is a very attractive platform for creating dynamic, highly interactive tools for visualizing data in 3D. In this chapter, we will build upon the fundamental concepts discussed in the previous chapter and extend our demos to incorporate more sophisticated OpenGL features for 3D rendering. To enable 3D visualization, we will first introduce the basic steps of setting up a virtual camera in OpenGL. In addition, to create more interactive demos, we will introduce the use of GLFW callback functions for handling user inputs. Using these concepts, we will illustrate how to create an interactive 3D plot with perspective rendering using OpenGL. Finally, we will demonstrate how to render a 3D volumetric dataset generated from a Monte Carlo simulation of light transport in biological tissue. By the end of this chapter, readers will be able to visualize data in 3D with perspective rendering and interact with the environment dynamically through user inputs for a wide range of applications...