In: Computer Science
Explain and describe the concept of homogeneous matrix (projection) and how it is used in computer graphics
Homogeneous matrix
If we write a linear system as a matrix equation, letting A be the coefficient matrix, x the variable vector, and b the known vector of constants, then the equation Ax = b is said to be homogeneous if b is the zero vector.
For example, the following matrix equation is homogeneous
Properties Of Homogeneous Systems
Always Consistent
One of the principle advantages to working with homogeneous systems over non-homogeneous systems is that homogeneous systems always have at least one solution, namely, the case where all unknowns are equal to zero. Such a case is called the trivial solution to the homogeneous system.
For instance, looking again at this system:
we see that if x = 0, y = 0, and z = 0, then all three equations are true. This holds equally true for the matrix equation
It is again clear that if all three unknowns are zero, then the equation is true. Whether or not the system has non-trivial solutions is now an interesting question.
Relation To Invertible Matrices
It turns out that looking for the existence of non-trivial solutions to matrix equations is closely related to whether or not the matrix is invertible.
Theorem. A square matrix M is invertible if and only if the homogeneous matrix equation Mx=0 does not have any non-trivial solutions.
That is, if Mx=0 has a non-trivial solution, then M is NOT invertible. If, on the other hand, M has an inverse, then Mx=0 only one solution, which is the trivial solution x=0.
Another consequence worth mentioning, we know that if M is a square matrix, then it is invertible only when its determinant |M| is not equal to zero. Hence, Mx=0 will have non-trivial solutions whenever |M| = 0.
Detecting Non-Trivial Solutions
Whenever there are fewer equations than there are unknowns, a homogeneous system will always have non-trivial solutions. For example, lets look at the augmented matrix of the above system:
Performing Gauss-Jordan elimination gives us the reduced row echelon form:
Which tells us that z is a free variable, and hence the system has infinitely many solutions.
Relation To General Linear Systems
At this point you might be asking "Why all the fuss over homogeneous systems?". One reason that homogeneous systems are useful and interesting has to do with the relationship to non-homogenous systems. It is often easier to work with the homogenous system, find solutions to it, and then generalize those solutions to the non-homogenous case.
Hence if we are given a matrix equation to solve, and we have already solved the homogeneous case, then we need only find a single particular solution to the equation in order to determine the whole set of solutions.
Homogeneous matrix in Computer Graphics
The rotation of a point, straight line or an entire image on the screen, about a point other than origin, is achieved by first moving the image until the point of rotation occupies the origin, then performing rotation, then finally moving the image to its original position.
The moving of an image from one place to another in a straight line is called a translation. A translation may be done by adding or subtracting to each point, the amount, by which picture is required to be shifted.
Translation of point by the change of coordinate cannot be combined with other transformation by using simple matrix application. Such a combination is essential if we wish to rotate an image about a point other than origin by translation, rotation again translation.
To combine these three transformations into a single transformation, homogeneous coordinates are used. In homogeneous coordinate system, two-dimensional coordinate positions (x, y) are represented by triple-coordinates.
Homogeneous coordinates are generally used in design and construction applications. Here we perform translations, rotations, scaling to fit the picture into proper position.
Example of representing coordinates into a homogeneous coordinate system: For two-dimensional geometric transformation, we can choose homogeneous parameter h to any non-zero value. For our convenience take it as one. Each two-dimensional position is then represented with homogeneous coordinates (x, y, 1).
Following are matrix for two-dimensional transformation in homogeneous coordinate: