Vector algebra th 1

Embed Size (px)

Citation preview

  • 8/8/2019 Vector algebra th 1

    1/10

  • 8/8/2019 Vector algebra th 1

    2/10

    Suppose we have a point P with position vectorSuppose we have a point P with position vectorpp andandthat this vector makes angles of A, B and C with the x, ythat this vector makes angles of A, B and C with the x, y

    and z axes respectively.and z axes respectively.

    Now the angle made by the p with the xNow the angle made by the p with the x--axis Supposeaxis Suppose

    pp = a= aii + b+ bjj + c+ ckk written in component form.written in component form.

    ThenThen p.ip.i == |p||i||p||i| cos Acos A ,,

    ButBut p.ip.i = (a= (aii + b+ bjj + c+ ckk)).i.i = a.= a.Also,Also, |i||i| = 1= 1 becausebecause ii is a vector of one unit in length.is a vector of one unit in length.So now we have,So now we have, a =a = |p||p| cos Acos A and thereforeand therefore

    cos A = a/cos A = a/|p||p|. Similarly,. Similarly, cos B = b/cos B = b/|p||p| and cos C = c/and cos C = c/|p||p|,,

  • 8/8/2019 Vector algebra th 1

    3/10

    Also we know thatAlso we know that |p| = (a|p| = (a22+b+b22+c+c22))

    We have now found the cosines of the anglesWe have now found the cosines of the angles

    whichwhich pp makes with themakes with the x, y and z axesx, y and z axesrespectively. These are calledrespectively. These are called directiondirectioncosinescosines..

    Now the vectorNow the vector(cos A)i + (cos B)j + (cos C)k(cos A)i + (cos B)j + (cos C)k isisrather special.rather special.

    Since it is equal toSince it is equal to (a/|p|)i + (b/|p|)j + (c/|p|)k(a/|p|)i + (b/|p|)j + (c/|p|)k itithas the same direction ashas the same direction as pp and lies alongand lies along OPOP..Also, its length is given by theAlso, its length is given by the square root ofsquare root of(cos2A + cos2B + cos2C)(cos2A + cos2B + cos2C)..

  • 8/8/2019 Vector algebra th 1

    4/10

    From above, this is the same as the squareFrom above, this is the same as the squareroot ofroot of{(a2 + b2 + c2) divided by (a2 + b2{(a2 + b2 + c2) divided by (a2 + b2

    + c2)}= 1+ c2)}= 1..

    So it is a unit vector in the direction ofSo it is a unit vector in the direction ofpp,,and it is often written by putting a littleand it is often written by putting a little

    circumflex that over thecircumflex that over the pp and calling itand calling it ppthat.If we had started with athat.If we had started with a free vectorfree vectorpp,,the working to find its direction cosinesthe working to find its direction cosines

    would be exactly the same, since thewould be exactly the same, since theangles it makes with theangles it makes with the 3 axes3 axes remainremainthe same if we slide it until its tail is at thethe same if we slide it until its tail is at theorigin.origin.

  • 8/8/2019 Vector algebra th 1

    5/10

    Principal Axis VectorsPrincipal Axis Vectors AAprincipal axis vectorprincipal axis vector, e.g. is named after

    the principal axis it's parallel to (thethe principal axis it's parallel to (thexxaxis foraxis forour example) and has a length of exactly oneour example) and has a length of exactly oneunit.unit.

    For 2D space,For 2D space, = [1 0] andand = [0 1].For 3D space,For 3D space, xx = [1 0 0],= [1 0 0], yy = [0 1 0]= [0 1 0] andandzz = [0 0 1].= [0 0 1].In math speak, these vectors form a basis, inIn math speak, these vectors form a basis, inparticular an orthonormal one. A basis is aparticular an orthonormal one. A basis is acollection of vectors combined in variouscollection of vectors combined in variousproportions to span the entirety of some space.proportions to span the entirety of some space.Orthonormal means the vectors are mutuallyOrthonormal means the vectors are mutually

    9090 to each other and each is one unit in lengthto each other and each is one unit in length

  • 8/8/2019 Vector algebra th 1

    6/10

    Principle Axis Principle AxisPrinciple Axis Principle Axis

    Vectors in 2Vectors in 2--D Vectors in 3D Vectors in 3--DD

    These symbols for the principal axis vectorsThese symbols for the principal axis vectorsare not universal. They are moreare not universal. They are more

    commonly known ascommonly known as ii,, jj andand kk..

  • 8/8/2019 Vector algebra th 1

    7/10

    Unit VectorsUnit VectorsUnit vectors are always one unit in length, likeUnit vectors are always one unit in length, like

    principal axis vectors, but can point in anyprincipal axis vectors, but can point in anydirection. They are used to indicate direction, ordirection. They are used to indicate direction, or

    used in pairs or triplets to form a new basis, aused in pairs or triplets to form a new basis, a

    local coordinate system. The orientation of anlocal coordinate system. The orientation of anaircraft may be described as three orientationaircraft may be described as three orientation

    vectorsvectors XX,,YY,,ZZ in some Cartesian spacein some Cartesian space

  • 8/8/2019 Vector algebra th 1

    8/10

    Normal VectorsNormal VectorsNormal vectors are perpendicular to something,Normal vectors are perpendicular to something,

    usually a line inusually a line in 2D space2D space or a plane inor a plane in 3D3Dspacespace. Technically. normal vectors can have. Technically. normal vectors can have

    any length greater than zero. In practice theyany length greater than zero. In practice they

    are often scaled to unit length to simplify theare often scaled to unit length to simplify theequations that utilize them. The process ofequations that utilize them. The process of

    forcing a vector to a length offorcing a vector to a length of11 is calledis callednormalizationnormalization, a confusing term since normal, a confusing term since normal

    vectors don't have to be of unit length andvectors don't have to be of unit length and

    normalisednormalised vectors aren't necessarily intendedvectors aren't necessarily intended

    to be normal to anything.to be normal to anything.

  • 8/8/2019 Vector algebra th 1

    9/10

    Normals are often assigned to theNormals are often assigned to thefaces or vertices on 3D polygonfaces or vertices on 3D polygonmeshes, pointing outward. Lightingmeshes, pointing outward. Lighting

    calculations use the normals and thecalculations use the normals and thedirection of a light source todirection of a light source todetermine the lit colour associateddetermine the lit colour associatedwith each normal.with each normal.

    Face normals used for flat shadingFace normals used for flat shading

  • 8/8/2019 Vector algebra th 1

    10/10

    Projection of VectorsProjection of Vectors

    Projection of vectorProjection of vectorABAB, making an angle of, making an angle ofwith the linewith the line LL, on line, on line LL is vectoris vectorP = |AB| cos P = |AB| cos