Reader small image

You're reading from  Mathematics for Game Programming and Computer Graphics

Product typeBook
Published inNov 2022
PublisherPackt
ISBN-139781801077330
Edition1st Edition
Tools
Right arrow
Author (1)
Penny de Byl
Penny de Byl
author image
Penny de Byl

Penny de Byl is a full stack developer with an honors in graphics and Ph.D. in artificial intelligence for games. She has a passion for teaching, teaching games development and computer graphics for over 25 years in 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 H3D Learn.
Read more about Penny de Byl

Right arrow

Understanding the difference between points and vectors

We can make sense of vectors by examining them in Cartesian coordinates. A vector in 2D is expressed as (x, y), in 3D as (x, y, z), and in 4D as (x, y, z, w).

Yes, I said four dimensions! At this stage, you are most likely looking at that “w” at the end of the expression and wondering where it came from. Don’t worry about it too much as its purpose will become clearer when we examine matrix multiplication.

In theory, a vector can be defined in any number of dimensions extending to infinity. They are used for complex mathematical calculations that can be found in applications relating to machine learning, astrophysics, financial analysis, and inverse kinematics, to name a few. However, in graphics, 2D, 3D, and 4D vectors are used.

Figure 9.1 illustrates a point and a vector in both 2D and 3D space. If you were to just look at the expressions for a vector, shown previously, you could be forgiven for...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mathematics for Game Programming and Computer Graphics
Published in: Nov 2022Publisher: PacktISBN-13: 9781801077330

Author (1)

author image
Penny de Byl

Penny de Byl is a full stack developer with an honors in graphics and Ph.D. in artificial intelligence for games. She has a passion for teaching, teaching games development and computer graphics for over 25 years in 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 H3D Learn.
Read more about Penny de Byl