Sign in to follow this  
Chad Seibert

Why affine transformations?

Recommended Posts

Chad Seibert    188
Hello, It never occurred to me until now, but why are the transformations used in 3d graphics programming affine? It seems really confusing, considering affine spaces are basically vector spaces without a zero vector, but when I rotate a mesh or translate it, I need to know where the origin is? Thanks a lot[smile]! Chad

Share this post


Link to post
Share on other sites
yahastu    154
Quote:
Original post by Chad Seibert
Hello,

It never occurred to me until now, but why are the transformations used in 3d graphics programming affine?


First of all, affine transformations are quite general -- more so than linear transformations. To quote mathworld, "Geometric contraction, expansion, dilation, reflection, rotation, shear, similarity transformations, spiral similarities, and translation are all affine transformations."

Secondly, it's not true that all transformations used in graphics are affine. Perspective matrices are also used. In other words, ALL kinds of matrix transformations are used in graphics.

Quote:
It seems really confusing, considering affine spaces are basically vector spaces without a zero vector, but when I rotate a mesh or translate it, I need to know where the origin is?


Affine space is not the same as affine transformation. Also affine spaces do have a zero vector...in fact one of the three defining properties of an affine space is that adding the zero vector to another vector doesn't change it. An affine space is basically just a regular space where you can add vectors to points and get a unique solution by adding two vectors together. Space-time is non affine but it would be ridiculous to try to model the effects of something like general relativity in a computer game, because at human scales things behave as if they were affine spaces.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this