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

Animations, sprites, image translation, object transformation and shadow effects are achieved through vectors and matrices. Popular video and image editors use vectors and matrices to mark mesh and model positions and overlay their skins with other materials. All these can be implemented in C#.









<< PreviousNext >>