Affine Transformations

by Evan Conrad, February 26, 2018

An affine transformation is a function that maps one vector to another.

Python Example

In the following example, we'll create an affine transformation that translates an x and y coordinate such that every point is moved right 10.

def moveRight(x, y):
    return (x + 10, y)

If we apply this function to every point in a grid, we have effectively moved that entire grid to the right.

Why this is cool

This gives us a pretty neat abstraction for moving, rotating, or reflecting 2d or 3d objects.

grid moves right on function call

Something wrong with this post? Edit it here.

Didn't understand something? Have a question? Ask it here.