39,59 €
Mathematics is an essential skill when it comes to graphics and game development, particularly if you want to understand the generation of real-time computer graphics and the manipulation of objects and environments in a detailed way. Python, together with Pygame and PyOpenGL, provides you with the opportunity to explore these features under the hood, revealing how computers generate and manipulate 3D environments.
Mathematics for Game Programming and Computer Graphics is an exhaustive guide to getting “back to the basics” of mathematics, using a series of problem-based, practical exercises to explore ideas around drawing graphic lines and shapes, applying vectors and vertices, constructing and rendering meshes, and working with vertex shaders. By leveraging Python, Pygame, and PyOpenGL, you’ll be able to create your own mathematics-based engine and API that will be used throughout to build applications.
By the end of this graphics focussed book, you’ll have gained a thorough understanding of how essential mathematics is for creating, rendering, and manipulating 3D virtual environments and know the secrets behind today’s top graphics and game engines.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 469
Veröffentlichungsjahr: 2022
Explore the essential mathematics for creating, rendering, and manipulating 3D virtual environments
Penny de Byl
BIRMINGHAM—MUMBAI
Copyright © 2022 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Group Product Manager: Rohit Rajkumar
Publishing Product Manager: Nitin Nainani
Senior Editor: Hayden Edwards
Senior Content Development Editor: Rashi Dubey
Technical Editor: Saurabh Kadave
Copy Editor: Safis Editing
Project Coordinator: Sonam Pandey
Proofreader: Safis Editing
Indexer: Hemangini Bari
Production Designer: Roshan Kawale
Marketing Coordinator: Teny Thomas
First published: November 2022
Production reference: 1041122
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-80107-733-0
www.packt.com
Life-long learning has always been my goal. But I couldn’t have done it alone. I’d like to thank Adrian who has been my friend, technical reviewer, and code tester throughout. He possesses the attention to detail I lack. And, I might add, if the code doesn’t work – it’s his fault. Next, I’d like to thank my wonderful daughter, Tabytha, who is in her first year of studying theoretical mathematics and computer science at university. She’s been a great sounding board in helping me understand mathematical notations that I still struggle with. A mother could not be prouder than I am of her.
– Penny de Byl
Penny de Byl is a full-stack developer with an honors degree in graphics and a PhD in artificial intelligence for games. She has a passion for teaching, and has been teaching games development and computer graphics for over 25 years at universities in Australia and Europe. Her best-selling textbooks, including Holistic Game Development with Unity, are used in over 100 institutions. She has won numerous awards for teaching, including an Australian Government Excellence in Teaching Award and the Unity Mobile Game Curriculum Competition. Her approach to teaching computer science and related fields is project-based, giving you hands-on workshops you can immediately get your teeth into. The full range of her teaching interests can be found at h3dlearn.com.
I’d like to thank the wonderful publishing crew and editors at Packt Publishing, who’ve been attentive, patient, highly professional, and available throughout the writing process.
Amit Verma is a game developer and WebGL graphics engineer from Dehradun, Uttarakhand, who has developed web versions of the Pixlr photo editor. He has rich experience in the gaming industry, with development experience of more than 60 games and 30 WebGL applications, using Unity3D and WebGL. His passion and curiosity toward gaming technologies and their challenges have helped his clients to launch games on various platforms, such as web, mobile, and consoles. He holds a BTech degree in computer science and engineering from Uttar Pradesh Technical University, where he studied computer science and graphics programming. Currently, he is working at Excellarate as a lead WebGL graphics engineer for the development of metaverse content using WebGL.
I would like to thank my best friend, my wife, and the love of my life, Simran Gogna, for supporting me in my hobbies and professional career. Her selfless love and wise advice gave me the strength to reach my goals. I also wish to thank my mentors, Sumeet Arora and Shiwani Arora, for providing inspiration and direction in my early career days.
When Soumya Mondal is not saving the world, he cosplays as a student at the Technical University of Munich and as a visual AI researcher at a start-up. He has shipped a few games, raising awareness of social issues, and has a strong belief in the power of games as a medium. In his free time, he travels and runs.
Preface
This part will step you through the process of setting up and testing your development environment to follow along with the exercises throughout the book. Follow along step-by-step as we set up the development environment to be used throughout the book and test it by producing a graphics window of your choice in Windows or macOS. Following this, we will explore the mathematics required to draw common 2D shapes on the screen by coding the necessary formula into our project. As the part proceeds, more drawing functionality will be added until you have a 3D drawing environment with mouse and keyboard interaction that is capable of drawing, texturing, and lighting a 3D model.
In this part, we cover the following chapters:
Chapter 1, Hello Graphics Window: You’re On Your WayChapter 2, Let’s Start DrawingChapter 3, Line Plotting Pixel by PixelChapter 4, Graphics and Game Engine ComponentsChapter 5, Let’s Light It Up!Chapter 6, Updating and Drawing the Graphics EnvironmentChapter 7, Interactions with the Keyboard and Mouse for Dynamic Graphics Programs