As of May 31, 2023, we have updated our Code of Conduct.
26 votes
Accepted

What are Affine Transformations?

An Affine Transform is a Linear Transform + a Translation Vector. $$ \begin{bmatrix}x'& y'\end{bmatrix} = \begin{bmatrix}x& y\end{bmatrix} \cdot \begin{bmatrix}a& b \\ c&d\end{bmatrix}...
luser droog's user avatar
  • 1,343
7 votes
Accepted

How to invert an affine matrix with small values?

I found a solution to my specific problem. Instead of computing the determinant and hitting the precision wall, I use the Gauss-Jordan method step by step. In my specific case of affine ...
solendil's user avatar
  • 251
6 votes

What are forms of affine transformations?

Note: I have answered before the edit from trichoplax and I thought you were searching for other transformations other than the one you mentioned. The informations below are still useful so I will ...
cifz's user avatar
  • 2,498
6 votes
Accepted

Why does an affine transform work only on three of the corners?

An affine transformation doesn't have enough freedom to do what you want. Affine transforms can be constructed to map any triangle to any other triangle, but they can't map any quadrilateral to any ...
Nathan Reed's user avatar
  • 24.4k
5 votes

How is that possible that matrices can be thought as coordinate systems?

If you have a 3x3 matrix representing some transformation, you will actually have the X,Y,Z vectors of that transformation in the rows or columns (depending on if it's a row major or column major ...
Alan Wolfe's user avatar
  • 7,711
5 votes

why is translating in 3D space the same as shearing in 4D space?

In a linear transformation system, your origin is always a fixed point, since 0*anything = 0. So imagine you have a cinema screen, and the origin is at the centre of the screen. Using linear ...
russ's user avatar
  • 2,332
4 votes

What is exactly the third component in homogeneous coordinate system?

To understand the $w$ component, it'll be easier to understand how homogeneous coordinates come about in the first place. The following example will be in 2D for the sake of simplicity, but the same ...
eclmist's user avatar
  • 222
4 votes
Accepted

Affine Transformation

It is not necessarily affine. An affine matrix in homogeneous coordinates has a form like: $$\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ 0 & 0 & 1 \...
Nathan Reed's user avatar
  • 24.4k
3 votes
Accepted

$P^2$ vs projection plane

In computer graphics the projection plane is most commonly defined as a plane perpendicular to the camera at a specific distance from the camera (the distance is often labeled $g$). It is the plane ...
pmw1234's user avatar
  • 2,832
3 votes

How is that possible that matrices can be thought as coordinate systems?

A matrix can be used to transform a coordinate system into a new one. More specifically, it can be used to transform the basis vectors of a coordinate system. That's how it defines a new coordinate ...
Olivier's user avatar
  • 1,585
3 votes
Accepted

Building a lookat camera matrix

Because all matrices are column-major, the translation matrix $\mathbf{T}$ should be $$ \mathbf{T}=\begin{bmatrix} 1 & 0 & 0 & e_x \\ 0 & 1 & 0 & e_y \\ 0 & 0 & 1 &...
TheBusyTypist's user avatar
3 votes

What is exactly the third component in homogeneous coordinate system?

The relationship between standard coordinates $(x,y)$ and homogeneous coordinates $(X,Y,Z)$ is $x = X / Z, y = Y/Z$. Homogeneous coordinates are a type of projective coordinates. All points on the ...
lightxbulb's user avatar
  • 1,951
2 votes
Accepted

Deciphering Affine/Projective Transformation Code

Your understanding of the matrix structure in Q3 is correct. This code just does not construct a matrix explicitly and the matrix multiplication is applied implicitly. I think this part might cause ...
TheBusyTypist's user avatar
2 votes

What kind of transformation when the aspect is changed for a rotated shape?

Let's talk about linear geometric transformations in homogeneous coordinates. In your question there are mainly two kind of geometric transformations involved: planar rotation and planar scaling, the ...
user106688's user avatar
2 votes
Accepted

How to convert from Object space into World space (exercise from 3D Math Primer book)

For others who might have this question, here a perhaps more straight forward numeric answer (I'm now working myself on this book as well). Consider that: We are given object space coordinates that ...
Darien Brito's user avatar
1 vote

Why shearing coefficients multiplying by y?

A shear can be thought of as an affine transformation that turns a square into a parallelogram: Note that the spacing of points at the same x-position are unchanged by the transformation; the ...
gilgamec's user avatar
  • 881
1 vote

How to convert from Object space into World space (exercise from 3D Math Primer book)

Let me try to translate the problem statement in a mathematical way so that it can be understood more easily. Assume that the robot is at the position (1, 10, 3) Assume there are a set of basis $\...
TheBusyTypist's user avatar
1 vote
Accepted

How to make a translation relative to the line ax + by + c = 0, affine transformations

If I understand correctly, you want to draw 2 objects mirrored with respect to an arbitrary line. Then when you move 1 object you want the other (reflection) to move with respect to that reflected ...
gallickgunner's user avatar
1 vote

How to make a translation relative to the line ax + by + c = 0, affine transformations

To mirror an object in relation to an arbitrary line, you first have to find the coordinates of that object in the frame of reference of that line. For convenience, we will define a frame of reference ...
Antony Riakiotakis's user avatar
1 vote
Accepted

OpenGL : How to rotate an object around viewing space x-axis

A rotation around the x-axis is achieved by this matrix $$ \mathtt{T}_\mathrm{rot X} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0& \cos \alpha & -\sin \alpha& 0 \\ 0 & \...
NodeCode's user avatar
  • 341
1 vote

OpenGL : How to translate an object with it's own axis

You can put the translation first, and then the rotation, but have the translation happen in the direction of the cow's head. To do that, you need a vector from the center of the cow to its head. Then ...
user1118321's user avatar
  • 3,391

Only top scored, non community-wiki answers of a minimum length are eligible