This is the first on what will be a series of posts showing the math behind commonly used formulas in graphics programming. In this post, we’ll take a vector (or a point) and rotate it by some amount about an origin. Take a look at the following diagram, rendered expertly below. Here we have the original vector, before its been rotated. It sits at the coordinates (x, y). It has an angle alpha, and is a fixed distance r from the origin.