Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mathematics for Game Programming and Computer Graphics

You're reading from   Mathematics for Game Programming and Computer Graphics Explore the essential mathematics for creating, rendering, and manipulating 3D virtual environments

Arrow left icon
Product type Paperback
Published in Nov 2022
Publisher Packt
ISBN-13 9781801077330
Length 444 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Penny de Byl Penny de Byl
Author Profile Icon Penny de Byl
Penny de Byl
Arrow right icon
View More author details
Toc

Table of Contents (26) Chapters Close

Preface 1. Part 1 – Essential Tools
2. Chapter 1: Hello Graphics Window: You’re On Your Way FREE CHAPTER 3. Chapter 2: Let’s Start Drawing 4. Chapter 3: Line Plotting Pixel by Pixel 5. Chapter 4: Graphics and Game Engine Components 6. Chapter 5: Let’s Light It Up! 7. Chapter 6: Updating and Drawing the Graphics Environment 8. Chapter 7: Interactions with the Keyboard and Mouse for Dynamic Graphics Programs 9. Part 2 – Essential Trigonometry
10. Chapter 8: Reviewing Our Knowledge of Triangles 11. Chapter 9: Practicing Vector Essentials 12. Chapter 10: Getting Acquainted with Lines, Rays, and Normals 13. Chapter 11: Manipulating the Light and Texture of Triangles 14. Part 3 – Essential Transformations
15. Chapter 12: Mastering Affine Transformations 16. Chapter 13: Understanding the Importance of Matrices 17. Chapter 14: Working with Coordinate Spaces 18. Chapter 15: Navigating the View Space 19. Chapter 16: Rotating with Quaternions 20. Part 4 – Essential Rendering Techniques
21. Chapter 17: Vertex and Fragment Shading 22. Chapter 18: Customizing the Render Pipeline 23. Chapter 19: Rendering Visual Realism Like a Pro 24. Index 25. Other Books You May Enjoy

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The color() method takes the red, green, and blue channels, respectively, as arguments.”

A block of code is set as follows:

import pygame pygame.init()screen_width = 800 screen_height = 200 screen = pygame.display.set_mode((screen_width,                  screen_height))

done = False white = pygame.Color(255, 255, 255)pygame.font.init()font = pygame.font.SysFont(‘Comic Sans MS’, 120, False, True)text = font.render(‘Penny de Byl’, False, white)while not done:  for event in pygame.event.get():    if event.type == pygame.QUIT:      done = True   screen.blit(text, (10, 10))  pygame.display.update()pygame.quit()

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

background = pygame.image.load(‘images/background.png’)sprite = pygame.image.load(‘images/Bird-blue-icon.png’)while not done:  for event in pygame.event.get():    if event.type == pygame.QUIT:      done = True   screen.blit(background, (0, 0))  screen.blit(sprite, (100, 100))
  pygame.display.update()pygame.quit()

Any command-line input or output is written as follows:

tick=2, fps=714.2857055664062
tick=1, fps=714.2857055664062
tick=1, fps=714.2857055664062
tick=1, fps=666.6666870117188
tick=2, fps=666.6666870117188

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Now, all you have to do is press Play to see the results.”

Tips or important notes

Appear like this.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime