usingMaths.com
Demonstrating and showing pupils and students one application of Mathematics.







<< PreviousNext >>

Writing Code for Vectors and Matrices in C++



Using Vectors and Matrices with C++

There are a number of operations that can be carried out on matrices - ranging from addition, subtraction all the way to determinant and matrix inverse.

If you have been following our lessons keenly, you are ripe enough to implement any of these matrix operations in code yourself. It's a simple matter of following the same rules that guide you when you calculate these operations by hand. (Do it as a personal project just to be sure).

What we intend to do here is to expose you to the beauty of Vectors and Matrices; how they are used to manipulate pictures and images to produce the effects you enjoy so much -- like picture scaling, skewing, flipping, rotating (clockwise and counter-clockwise), mirroring, merging several pictures (with different effects), colour inverting, e.t.c. -- in picture-design-and-editing applications, and also the theatrical effects produced in games and movies.

Just bear it in mind that vectors are special cases of matrices. That is, vectors are 1 by m or m by 1 dimensional matrices depending on how you choose to look at it.


Image and Picture Effects

Well, what we are trying to tell you in one phrase is that you should learn OpenGL.
OpenGL is a graphics language in a nut-shell.
We have provided some links to help you get started.









<< PreviousNext >>