Vector
sacred cow nhat hao museum internship new york city east central oklahoma football key exchange play she knows who she is site myspace.com most popular search terms should smoking be allowed in public place voip bandwidth calculations activation code free window xp statewide criminal record check jumbo records no audio sound to my computer auction house england jeff im going us army pt scores association ga realtor tcs address matins du monde martin lewis money saving lyrics planet rock active in usa volcano racing car sales ventas al detalle preparing for the sat shop n go news panama city information technology employment agency vw seat fire samba music mp3 lemon aid com top 20 singles in the uk lyric man piano pocket wizard review official nfl jersey which broadband sprint car builder personal hygiene when handling food jay z linkin park mp3 using tapi independent living centers california st. leos university florida interracial slut teen pillow talk is extra italian soccer standing missouri construction jobs vintage 1930s clothes md taxes status mosaic store tile new york city marketing firm mindfulness group sponge bob backgrounds old spanish movies entrepreneur make money 446th airlift wing san antonio obituary no swearing in situ definition science y que los feliz the body by stephen king notes viajante the grudge halloween acetic acid and calcium carbonate remax properties inc. wen power utada hikaru picture i loved lyric shortcut bar replacement ecommerce credit card processing ac hour meter if god made you lyrics ergonomics exercises text books for college extended laptop battery life neurontin use tow ropes top black university the country furniture collection screwdriver types access deleting denied folder marvel hair schools toilet sign window 2000 hardware requirement porn blocking software music jamming pocket wizard review 1903 ford model toxic substances control act of 1976 java chatroom download auction car dealer california volkswagen customer service complaints eclipse compiler for java agent alabama columbus estate real vehicle dynamics password to folder address data entry standards africa elizabeth port area de perfil tarea y promotional products in australia

For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
A Scalar is a variable that has magnitude (a value). A Vector is a variable with both magnitude and direction, and as such has multiple values.
The most commonly seen format for a vector is {x,y,z}, the value show represent displacement values for the direction of the vector. a vector defined as {6,0,0} is pointing down the positive x-axis, and has a magnitude (or 'length') of 6.
Points vs. Vectors and Homogeneous Coordinates
Vectors are not very much different from points, which are also comprised of an x,y, and z value. in many mathematics systems that use both vectors and points, and extra value is added, and the vector/point is said to be defined in homogeneous coordinates, {x,y,z,w}. Points have a homogeneous coordinate of 1, vectors have one of 0.
This would at first seem to be just a simple way to tell vectors and points apart, but it still serves a function.
consider two points: {1,1,1,1} and {0,0,1,1}. If we wanted to find the displacement between the two points we would use subtraction:
{1,1,1,1} - {0,0,1,1} = {1,1,0,0}
This is the result that should be expected, as displacement is a vector value. The new vector now points from the first point to the second.
Attempting to add two points together is geometrically illogical, and the result here would be:
{1,1,1,1} + {0,0,1,1} = {1,1,2,2}
The homogeneous 'w' coordinate is now 2, neither a point nor a vector. However, adding a displacement to a point is still reasonable:
{1,1,1,1} + {0,0,1,0} = {1,1,2,1}
the result is still a point
also, vectors can still be safely added and subtracted, since their homogeneous coordinate is always zero.
Vector mathematics
A normalized vector is one with a magnitude of 1. To achieve this divide a vector by its length |V| (see below)
Consider two vectors here called 'V' and 'W', they are not defined in homogeneous coordinates There are several math operations that apply only to vectors such as: (these symbols are not built into c++, they are merely those that would normally appear in books on vector math)
Symbol Purpose C++ code |V| -> the length of vector V = sqrt(v.x*v.x + v.y*v.y + v.z*v.z) //Scalar V*W -> vector dot product = v.x*w.x + v.y*w.y + v.z*w.z //Scalar VxW -> vector cross product = {v.y*w.z - w.y*v.z , v.z*w.x - w.z*v.x , v.x*w.y - w.x*v.y} //Vector
These two apply only to normalized vectors:
V*W -> dot product, its result will be the cosine of the angle between the two vectors VxW -> cross product, it will result in the sine of the angle between the two vectors
Also useful to know is that the cross product of any two vectors will always be perpendicular to both vectors (unless they both point in the same or opposite directions!)
Example: the cross product of a vector pointing down the x-axis and a vector pointing down the y-axis is a vector pointing down the z-axis.
This function is commonly used to generate surface normals based upon geometry. These are later used in lighting systems.
Consider a triangle made of the points {0,0,0},{1,0,0},{0,1,0} we compute the displacements from one point to the two others. (in this case we have {0,0,0} as a point and so the points themselves are also the displacements) then we take the cross product:
{1,0,0}x{0,1,0} = {0,0,1} this also happens to be a vector pointing straight up perpendicular to the triangle