What kind of beast are affine transformations?

Most likely, each of you has heard the term “affine transformations” at least once in your life. Indeed, everyone is constantly talking about them: "invariance to affine transformations", "augmentation using affine transformations", "affine transformations in computer graphics" and so on. However, not everyone can immediately answer a simple question: "Tell us what affine transformations are in simple words."





You can? Anyway, let's discuss this issue for a bit.





What is Affine Transformation?

Let's start with the classics - definition from Wikipedia.





Affine transformation (from Latin affinis "touching, close, adjacent") is a mapping of a plane or space into itself, in which parallel lines pass into parallel lines, intersecting lines into intersecting lines, crossing lines into intersecting lines.





Let's clarify a little.





First, what does “self-mapping” mean ? This means that if we were in space R ^ n, then after education we must remain in it. For example: if we applied some kind of transformation to a rectangle and got a parallelepiped, then we left R ^ 2in R ^ 3. But if we got another rectangle from the rectangle, then everything is fine, we mapped the original space into ourselves. Formally it is described as follows: "transformation fmaps space R ^ nto R ^ n". If written using formulas f: R ^ n \ rightarrow R ^ n.





-, « »? , , . , . , . , . - .





, - . , : 2D . , 2 . , . , - , .





, - .





( ).





, , .





, , , , .





, « ». .. - , - .





- , - . : - . , ( , ).





, . , .





. - x y. x ' y ' :





\ begin {cases} x '= \ alpha x + \ beta y + \ lambda \\ y' = \ gamma x + \ delta y + \ mu \ end {cases}

, \ alpha, \ beta, \ gamma, \ mu :





\ begin {pmatrix} \ alpha & \ beta \\ \ gamma & \ delta \ end {pmatrix}

: , , ..





\ begin {vmatrix} \ alpha & \ beta \\ \ gamma & \ delta \ end {vmatrix} \ neq 0

.





f: R ^ n \ rightarrow R ^ n- f (x) = Mx + v, M- , v \ in R ^ n. x, , n- .





, . .





- \ alpha, \ beta, \ gamma, \ mu, \ delta, \ lambda? .





\ alpha = cos (\ alpha), \ beta = sin (\ alpha), \ gamma = -sin (\ alpha), \ delta = cos (\ alpha), \ lambda = \ mu = 0.





, M :





\ begin {pmatrix} cos (\ alpha) & sin (\ alpha) \\ -sin (\ alpha) & cos (\ alpha) \ end {pmatrix}





:





\ begin {cases} x '= xcos \ alpha + y sin \ alpha \\ y' = -xsin \ alpha + y cos \ alpha \ end {cases}

? , - \ alpha. .. . .





-

M :





\ begin {pmatrix} 1 / k_x & 0 \\ 0 & 1 / k_y \ end {pmatrix}

:





\ begin {cases} x '= x / k_x \\ y' = y / k_y \ end {cases}

, , , 1 , 1. .





, k_x -1, k_y 1. ? , OY.





.





M (.. \ alpha = \ delta = 1, beta = \ gamma = 0). \ lambda -dx, \ mu = -dy.





, :





\ begin {cases} x '= x - dx \\ y' = y - dy \ end {cases}

, (dx, dy). , , .





This short article will allow you to feel a little more strongly the "insides" of affine transformations (we hope so). After reading it, try to answer the question that we posed at the very beginning - "Tell us what affine transformations are in simple words." Can you now?





PS By the way, it would be nice not to take our word for it and check it ourselves - and the matrices Mthat we used are definitely non-degenerate? Maybe we did something illegal at all? ...








All Articles