Mathematics for Game Programming and Computer Graphics: Explore the essential mathematics for creating, rendering, and manipulating 3D virtual environments
Book information
Description
A comprehensive guide to learning fundamental 3D mathematical principles used in games and computer graphics by example Key FeaturesGet acquainted with the essential mathematics needed to describe, simulate, and render 3D creationsConstruct and manipulate 3D animated environments using Python, Pygame, and PyOpenGLDevelop vertex and fragment shaders in OpenGL shader language to speed up renderingBook Description 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. What you will learnGet up and running with Python, Pycharm, Pygame, and PyOpenGLExperiment with different graphics API drawing commandsReview basic trigonometry and how it's important in 3D environmentsApply vectors and matrices to move, orient, and scale 3D objectsRender 3D objects with textures, colors, shading, and lightingWork with vertex shaders for faster GPU-based renderingWho this book is for This book is for programmers who want to enhance their 3D mathematics skills relating to computer graphics and computer games. Knowledge of high school–level mathematics and a working understanding in an object-orientated language is needed to grasp the contents present in this book. Table of ContentsHello Graphics Window: You're on your wayLet's Start DrawingLine Plotting Pixel by PixelGraphics and Game Engine ComponentsLet's Light it Up!Updating and Drawing the Graphics EnvironmentInteractions with the Keyboard and Mouse for Dynamic Graphics ProgramsReviewing Our Knowledge of TrianglesPracticing Vector EssentialsGetting acquainted with Lines, Rays and NormalsManipulating the Light and Texture of TrianglesMastering Affine TransformationsUnderstanding the Importance of MatricesWorking with coordinate SpacesNavigating the view spaceRotating with QuaternionsVertex and fragment shadingCustomizing the Render PipelineRendering Visual Realism Like a Pro Cover Title Page Copyright and Credits Contributors Table of Contents Preface Part 1 – Essential Tools Chapter 1: Hello Graphics Window: You’re On Your Way Technical requirements Getting Started with Python, PyCharm, and Pygame Creating a Basic Graphics Window Working with Window and Cartesian Coordinates Let’s do it… Your Turn… Summary Answers Chapter 2: Let’s Start Drawing Technical requirements Color Let’s do it… Your turn… Lines Let’s do it… Your turn… Let’s do it… Text Let’s do it… Your turn… Polygons Let’s do it… Your turn… Raster Images Let’s do it… Summary Answers Chapter 3: Line Plotting Pixel by Pixel Technical requirements The Naïve Way: Drawing a line with brute force Let’s do it… Enter Bresenham: The improved approach Let’s do it… Drawing circles the Bresenham way Let’s do it… Anti-aliasing Summary Chapter 4: Graphics and Game Engine Components Technical requirements Exploring the OpenGL Graphics Pipeline Let’s do it… Drawing Models with Meshes Let’s do it… Your turn… Viewing the Scene with Cameras Projecting Pixels onto the Screen Understanding 3D Coordinate Systems in OpenGL Perspective Projection Your turn… Projecting into the NDC Let’s do it… Your turn… Summary Answers Chapter 5: Let’s Light It Up! Technical requirements Adding Lighting Effects Let’s do it… Your turn… Placing Textures on Meshes Let’s do it… Let’s do it… Summary Answers Chapter 6: Updating and Drawing the Graphics Environment Technical requirements Introducing the main game loop Updating and drawing objects Let’s do it… Your turn… Measuring time Let’s do it… Summary Answers Chapter 7: Interactions with the Keyboard and Mouse for Dynamic Graphics Programs Technical requirements Working with mouse interactions Let’s do it… Your turn… Combining 2D and 3D environments Let’s do it… Converting the mouse to projection coordinates Let’s do it… Your turn… Let’s do it… Adding keyboard commands Let’s do it… Your turn… Let’s do it… Summary Answers Part 2 – Essential Trigonometry Chapter 8: Reviewing Our Knowledge of Triangles Technical requirements Comparing similar triangles Working with right-angled triangles Your turn… Calculating angles with sine, cosine, and tangent Investigating triangles by drawing 3D objects Summary Answers Chapter 9: Practicing Vector Essentials Technical requirements Understanding the difference between points and vectors Defining vector key operations Let’s do it… Working out a vector’s magnitude Your turn… Exploring the relationship between angles and vectors The dot product The cross product Summary Answers Chapter 10: Getting Acquainted with Lines, Rays, and Normals Technical requirements Defining lines, segments, and rays Using the parametric form of lines Your turn… Let’s do it… Calculating and displaying normals Your turn… Let’s do it… Your turn… Summary Answers Chapter 11: Manipulating the Light and Texture of Triangles Technical requirements Displaying Mesh Triangle Normals Let’s do it… Defining polygon sides with normals Working with visible sides of a polygon Culling Polygons According to the Normals Let’s do it… Let’s do it… Exploring How Normals Affect Lighting Let’s do it… Summary Part 3 – Essential Transformations Chapter 12: Mastering Affine Transformations Technical requirements Translating points in 3D Your turn… Scaling points with x, y, and z Let’s do it… Your turn… Rotating points around a pivot Let’s do it… Exploring transformation orders Shearing and reflections Summary Answers Chapter 13: Understanding the Importance of Matrices Technical requirements Defining matrices Performing operations on matrices Adding and subtracting matrices Multiplying by a single value Dividing matrices Creating matrix representations of affine transformations Moving from linear equations to matrix operations Compounding affine transformations Combining transformation matrices for complex maneuvers Let’s do it… Summary Answers Chapter 14: Working with Coordinate Spaces Technical requirements Understanding OpenGL’s Matrix Stack Working with the Model Matrix Let’s do it… Your turn… Working with the View Matrix Let’s do it… Working with the Projection Matrix Let’s do it… Your turn… Summary Answers Chapter 15: Navigating the View Space Technical requirements Flying maneuvers Let’s do it… Your turn... Understanding and fixing compound rotation quirks Improving camera orientations Let’s do it… Summary Answers Chapter 16: Rotating with Quaternions Technical requirements Introducing quaternions Rotating around an arbitrary axis Exploring quaternion spaces Let’s do it… Working with unit quaternions Your turn… Understanding the purpose of normalization Let’s do it... Your turn... Summary Answers Part 4 – Essential Rendering Techniques Chapter 17: Vertex and Fragment Shading Technical requirements Understanding shaders Transferring processing from the CPU to the GPU Let’s do it… Processing pixel by pixel Let’s do it… Summary Chapter 18: Customizing the Render Pipeline Technical requirements Coloring and texturing mesh faces Let’s do it… Let’s do it… Your turn... Turning on the lights Ambient lighting Diffuse lighting Phong Summary Answers Chapter 19: Rendering Visual Realism Like a Pro Technical requirements Following where light bounces Applying the Inverse Square Law Calculating Bidirectional Reflectance Distribution functions The Fresnel effect Geometric attentuation factor Putting it all together Let’s do it… Summary Index Other Books You May Enjoy
Similar books
Holistic Mobile Game Development with Unity
2014 · PDF
Holistic Game Development with Unity. An All-in-One Guide to Implementing Game Mechanics, Art, Design and Programming
2017 · PDF
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF
THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.
1858 · PDF
Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.
2022 · PDF