Chris Revell’s Blog

In the world of Computer Games Programming

Archive for the ‘Introduction to 3D Graphics’ Category

Matrices

Posted by chrisrevell on October 20, 2009

i have been working on my matrices this week. i have written a class to handle this. i write the constructor and deconstructor.
For the main body of the matrices math, to change the math into code was not hard but the way i did it was to write 2 For loops.

for( int i =0; i < 4; i++)
{
    for( int j=0;  j < 4; j++)
    {
     }
}

doing this saved me time and not doing more coding. i did have a problem with  wriing the matrix transform. i really had to think about this, as i did not get it right the first time or the second time. But the Number look right and the math adds up but later on will tell.

Posted in Introduction to 3D Graphics | Leave a Comment »

Vectors

Posted by chrisrevell on July 28, 2009

This week in introduction to 3-D graphics programming I had to create vector class, which contains all functions that can be done with vectors. I have made a test program to show you the results.

Vector
                                                    Vector test program

To make this it wasn’t very hard as I’ve done my research into vectors. I had no serious problems with making the vector class just a few little simple errors to deal with. By doing this I have started to make 3-D renderer.

Dot Product

a vector can be multiplied by another vector. The dot product of A and B is a scalar that measures the tenancy of the two vectors to point in the same direction.

If A and B are perpendicular (normal at right angles to be a horizontal plane) then the dot product is zero.

The dot product or vector with itself is just the square of its length.                                                                                                                                   

Cross product

Cross product of two vectors is a new vector, perpendicular (normal at right angle, to horizontal plane) to the plane of the two original vectors. Its length is the area of the parallelogram (a two-dimensional geometric figure formed of four sides in which both pairs of opposite sides are parallel and of equal length, and the opposite angles equal) formed by the original vectors.

Its direction is determined by the right-hand rule. The cross product measures the tendencies of the two vectors to be perpendicular and its one or more effective tools for describing, spinning and rotating objects.

Next week I make the matrix class for 3-D renderer.

Posted in Introduction to 3D Graphics | Leave a Comment »

Introduction

Posted by chrisrevell on July 27, 2009

Hi and welcome to introduction to 3-D graphics programming blog. Over the next 12 weeks I will be writing this blog to show you my progress on my 3-D graphics renderer.

In this blog I will be talking the problems I had my renderer and how overcame them problems. We take the maths from vectors too matrices, camera and lights, backface culling and texturing.

 I hoping enjoy reading

Posted in Introduction to 3D Graphics | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.