PDA

Click to See Complete Forum and Search --> : Directx newbie


alex_read
Aug 18th, 2000, 09:42 AM
I have just got the MS Dirextx 7a SDK & am battling my way through thousands of pages of explainations in their word docs provided.

Slight problem getting my head aroung matrix's. Whilst I check the local libraries for degree level maths books, can anyone recommend any sites which explain this in a simpler manner?

Thank you!
Alex Read

ca9mbu
Aug 18th, 2000, 10:57 AM
I'm in exactly the same situation...any help on matrices would be gratefully appreciated.

Matt

Fox
Aug 18th, 2000, 11:59 AM
Matrices

You know what a variable is? (Dim A as Integer) This should be clear. Well, imagine a situation where you need many variables, ie. to store a highscore. You can make it as following:

Dim Place1 as String
Dim Place2 as String
Dim Place3 as String
...

So you can store several values (names) in your list. But it would be easier to use a loop... so you can make a 1 dimensional matrix (called 'array'):

Dim Places(10) as Long
Dim A as long

For A = 0 to 10
Place(A) = "User " & A
Next

As you can see it's much easier to handle. Now we want to store ie. coordinates, that's where we can use a 2D-matrix:

'10 points, each with x (n,0) and y (n,1)
Dim Point( 10, 1 )

Point( 0, 0 ) = 0
Point( 0, 1 ) = 10

Point( 1, 0 ) = 15
Point( 1, 1 ) = -4
...

I hope you get the idea.. if not search the forums, I alreaday explained matrices once...

alex_read
Aug 21st, 2000, 03:07 AM
Thanks fox, I get the variable & array idea, I think this has made it clearer & I can read up with a better understanding now!

Thank you,
Alex Read

ca9mbu
Aug 21st, 2000, 10:37 AM
Just found this good intro to graphics programming:

Grahics stuff (http://www.geocities.com/SiliconValley/2151/graphics.html). As you will see it covers the basics of 2d stuff first, then 3d and onto matrices.

Hope this helps

Matt