This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.

This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.

Vector maths – a primer for games programmers

Home/Vector maths – a primer for games programmers
Vector maths – a primer for games programmers 2017-03-01T16:27:39+00:00

Share

Hello and welcome back to my blog!

I've decided to do something a little different this time around; I've updated and bought together some old reference material that I wrote, added some interactive demos and expanded on the diagrams. I hope that the result will serve as an accessible introduction to vector mathematics for games programmers.

Definitions

  • Scalars are written in lower case: a, b, c
  • Vectors are written in upper case: A, B, C
  • Matrices are written in bold upper case: A, B, C
  • |a| mean abs(a), the absolute value of scalar a
  • ||A|| means magnitude, or length of the vector A
  • ? means vector A is unit length
  • Matrices are in row-major order, which means the rows are left to right in the matrix
  • MT means the transpose of M

Reading order

This is designed to be read in the following order:

Vectors
Rotation
Matrices

But of course you can just use it as reference material.

Contents

Vectors

All
Magnitude of vector
Unit vector
Dot product
Projection
The Cross and Wedge Products
Perpendicular operator

Rotation

All
Rotating a vector from world space into object space
Rotating a vector from object space to world space

Matrices

All
Multiplying two matrices
Rotating a matrix from world space into object space
Rotating a matrix from object space into world space
Transform point from world space into object space
Transform point from object space into world space
Transformation matrices
Inverse of a matrix
Orthonormal matrix
Determinant of a matrix

Until next time, have fun!

Cheers, Paul.