1st Edition

Developing Graphics Frameworks with Python and OpenGL



  • Available for pre-order. Item will ship after July 7, 2021
ISBN 9780367721800
July 7, 2021 Forthcoming by CRC Press
328 Pages 157 Color Illustrations

USD $120.00

Prices & shipping based on shipping country


Preview

Book Description

Developing Graphics Frameworks with Python and OpenGL shows you how to create software for rendering complete three-dimensional scenes. The authors explain the foundational theoretical concepts as well as the practical programming techniques that will enable you to create your own animated and interactive computer-generated worlds.

You will learn how to combine the power of OpenGL, the most widely adopted cross-platform API for GPU programming, with the accessibility and versatility of the Python programming language. Topics you will explore include generating geometric shapes, transforming objects with matrices, applying image-based textures to surfaces, and lighting your scene. Advanced sections explain how to implement procedurally generated textures, post-processing effects, and shadow mapping. In addition to the sophisticated graphics framework you will develop throughout this book, with the foundational knowledge you will gain, you will be able to adapt and extend the framework to achieve even more spectacular graphical results.

Table of Contents

Introduction to Computer Graphics

1.1 Core Concepts and Vocabulary

1.2 The Graphics Pipeline

1.2.1 Application Stage

1.2.2 Geometry Processing

1.2.3 Rasterization

1.2.4 Pixel Processing

1.3 Setting up a Development Environment

1.3.1 Installing Python

1.3.2 Python Packages

1.3.3 Sublime Text

1.4 Summary and Next Steps 

 

Introduction to Pygame and OpenGL

2.1 Creating Windows with Pygame

2.2 Drawing a Point

2.2.1 OpenGL Shading Language

2.2.2 Compiling GPU Programs

2.2.3 Rendering in the Application

2.3 Drawing Shapes

2.3.1 Using Vertex Buffers

2.3.2 An Attribute Class

2.3.3 Hexagons, Triangles and Squares

2.3.4 Passing Data Between Shaders

2.4 Working with Uniform Data

2.4.1 Introduction to Uniforms

2.4.2 A Uniform Class

2.4.3 Applications and Animations

2.5 Adding Interactivity

2.5.1 Keyboard Input with Pygame

2.5.2 Incorporating with Graphics Programs

2.6 Summary and Next Steps 

 

Matrix Algebra and Transformations

3.1 Introduction to Vectors and Matrices

3.1.1 Vector Definitions and Operations

3.1.2 Linear Transformations and Matrices

3.1.3 Vectors and Matrices in Higher Dimensions

3.2 Geometric Transformations

3.2.1 Scaling

3.2.2 Rotation

3.2.3 Translation

3.2.4 Projections

3.2.5 Local Transformations

3.3 A Matrix Class

3.4 Incorporating with Graphics Programs

3.5 Summary and Next Steps

 

A Scene Graph Framework

4.1 Overview of Class Structure

4.2 3D Objects

4.2.1 Scene and Group

4.2.2 Camera

4.2.3 Mesh

4.3 Geometry objects

4.3.1 Rectangles

4.3.2 Boxes

4.3.3 Polygons

4.3.4 Parametric Surfaces and Planes

4.3.5 Spheres and Related Surfaces

4.3.6 Cylinders and Related Surfaces

4.4 Material objects

4.4.1 Base Class

4.4.2 Basic Materials

4.5 Rendering Scenes

4.6 Custom Geometry and Material Objects

4.7 Extra Components

4.7.1 Axes and Grids

4.7.2 Movement Rig

4.8 Summary and Next Steps 

 

Textures

5.1 A Texture Class

5.2 Texture Coordinates

5.2.1 Rectangles

5.2.2 Boxes

5.2.3 Polygons

5.2.4 Parametric Surfaces

5.3 Using Textures in Shaders

5.4 Rendering Scenes with Textures

5.5 Animated Effects with Custom Shaders

5.6 Procedurally Generated Textures

5.7 Using Text in Scenes

5.7.1 Rendering Text Images

5.7.2 Billboarding

5.7.3 Heads-Up Displays and Orthogonal Cameras

5.8 Rendering Scenes to Textures

5.9 Post-Processing

5.10 Summary and Next Steps

 

Light and Shadow

6.1 Introduction to Lighting

6.2 Light Classes

6.3 Normal Vectors

6.3.1 Rectangles

6.3.2 Boxes

6.3.3 Polygons

6.3.4 Parametric Surfaces

6.4 Using Lights in Shaders

6.4.1 Structs and Uniforms

6.4.2 Light-Based Materials

6.5 Rendering Scenes with Lights

6.6 Extra Components

6.7 Bump Mapping

6.8 Bloom and Glow Effects

6.9 Shadows

6.9.1 Theoretical Background

6.9.2 Adding Shadows to the Framework

6.10 Summary and Next Steps           

...
View More

Author(s)

Biography

Lee Stemkoski is a professor of mathematics and computer science. He earned his Ph.D. in mathematics from Dartmouth College in 2006 and has been teaching at the college level since. His specialties are computer graphics, video game development, and virtual and augmented reality programming.

Michael Pascale is a software engineer interested in the foundations of computer science, programming languages, and emerging technologies. He earned his B.S. in Computer Science from Adelphi University in 2019. He strongly supports open source software and open access educational resources.