![]()
::[ MATH 01 - VECTORS
]::[ Printable Version
]::
::[
DISCLAIMER
]::
I will hold no responsibility to whatever happens to you, your computer, your sanity, your pet, or whatever that may happen to your existence for your reading the texts given in each tutorial. So in short, read at your own risk!
Anyway, I'm doing this mathematics tutorial to fill in the gap that I've found while searching for tutorials on graphics programming on the Internet. I hope this helps fill the gap!...:). The first tutorial will be about vectors in the plane. "Vector" and "plane" are probably two of the most used words (and two of the most basic concepts needed) in the realm of three-dimensional graphics, that's why I'm introducing them here first. SideNote: Everything that I will be discussing in my math tutorial series are based on what was taught to us (and how I understood the stuffs taught to us) at school.
To elaborate further what a vector is, a vector is both a direction and magnitude/length. Let's say that (0,0) is the origin and you have a vector <1,1>, then the direction of your vector is from (0,0) towards <1,1>. Here's an illustration:
y-axis
^
|
+
|
|
+ _ <1,1>
| /|
|/
<-+---+---+---+----+--> x-axis
|
|
v
From here onwards, whenever you see: "Vec A", this means I'm referring to a vector named A. The next three paragraphs will be some definitions that you probably will never read again in any of my future math tutorials...but they are included for your knowledge and for completeness of the topic (you wouldn't want to be laughed at knowing all those advanced math stuffs without knowing the basics would you?...;) ). Don't worry, the definitions are easy...;).
[ OPERATIONS ON VECTORS IN 3D-SPACE ] Things get a bit interesting here. I will now introduce to you guys two operations that you can do with vectors on 3D-space (aka, R^3):
And now, we laborously go through some properties resulting in my introduction about operations on vectors vectors in 3D-space... hehehe...=). [ PROPERTIES OF ADDITION ]
And now, more definitions (I know, I know, you're starting to get annoyed with them...but be forewarned, they will exist A LOT in my tutorial series...;) ).
y-axis
^
+
| -> tan Q = -2 / 2 = -1
+ -> tan Q = -1
| -> Q = 3(pi) / 4
<-2,2> _ +
|\ |
\~+~_
\|Q \
<-+---+---+---+----+--> x-axis
|
+
v
Guess what, more definitions...;)...:
||<-4,3>|| = square root(-4*-4 + 3*3)
= square root(16 + 9)
= square root(25)
= 5
Example for Definition 1.6:
Find a unit vector in the direction of Vec A = <5,-12>:
Let's grab the magnitude first (using Definition 1.5)
||Vec A|| = square root(5*5 + (-12)*(-12))
= square root(169)
= 13
Then the unit vector in the direction of Vec A Is:
= <5/13, -12/13>
Simple, don't you think so?
/|
/ |
/ |
/ |
/ |
/ |
/ |
/_ _|
/j ) | |
+-------+-+
<--- a1 -->
Again, in the illustration above, ||Vec A|| is the hypothenus. Guess what, MORE definitions!... ...kiddin'!...hehe...we're done actually...;).
Well, that sums up my first math tutorial. I hope you guys like it! I'm sorry for the rather bad ASCII art...hehe...:/). Part 2 will be about the dot product. Briefly, the dot product accepts two vectors and the result is a single (*cough* scalar...;)) number. Its use and purpose you will know in Part 2!...:).
|
|