Thread: 3d math questions

  1. #1
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926

    3d math questions

    I have a book with questions at the end of each chapter, but no answers(3d Math Primer for Graphics and Game Development). I was wondering if anyone here could check my answers
    Code:
    (dfdp)=dot for dot product
    (cfcp)=cross for cross product
    norm(x)=normalize vector x
    
    I.
    a)  -[3 7]  =  [-3  -7]
    b)  ||[-12  5]||  =  13
    c)  ||[8  -3  1/2]||  =  8.56(about)
    d)  3[4  -7  0]  =  [12  -21  0]
    e)  [4  5]/2  =  [2  2.5]
    
    II.
    a)  norm([12  5])  =  [12/13  5/13]
    b)  norm([8  -3  1/2])  =  [100/107  -75/214  25/428](about)
    
    III.
    a)  [3  10  7] - [8  -7  4]  =  [-5  17  3]
    b)  3[a  b  c] -  4[2  10  -6]  =  [3a-8  3b-40  3b-24]
    
    IV.  Compute the distance between the pairs of points
    a)  [3  10  7],[8  -7  4]  =  17.972(about)
    b)  [10  6],[-14  30]  =  33.941(about)
    
    V.
    a)  I don't get this one.  [2  6] (dfdp) -38???
    b)  3[-2  0  4] (dfdp) ([8  -2  3/2] + [0  9  7])  =  78  (Could someone explain the order of precedence on this one?)
    
    VI.
    a)  compute angle betweent the vectors [1  2]  and [-6  3]  =  90
    
    VII.
    Given the vectors
    v=[4  3  -1], n=[sqrt(2)/2  sqrt(2)/2  0]
    separate v into components that are perpendicular and parallel to n.(n is a unit vector)  I don't know how to do this one
    
    VIII.
    [3  10  7] (cfcp) [8  -7  4] =  [89  44  -101]
    thanks for any help.

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    III. b. should be :

    [3a-8 3b-40 3c+24].

    V. a. Doesn't make sense to me.

    V. b. First take care of the left hand side.
    Distribute the 3 through the vector. Then on the
    right hand side, add the vectors together. Now take the dot product of the two vectors, which should be:

    (-6, 0, 12) DOT (8, 7, 8.5) = (-6*8 + 0*7 + 12*8.5) = 54

    I believe that is correct.

    VII.
    This just has to do with some simple projections. I'll go through it briefly but I'm sure you can read about it later.

    I'll take it straight from my linear algebra book because they can explain it better than I can.

    If u and a are vectors in 2-space or 3-space and if a != 0, then

    proj a u = ((u DOT a) / (||a||^2)) * a

    That yields the vector component of u along a (parallel).

    u - proj a u = u - ((u DOT a) / (||a||^2)) * a

    That yields the vector component of u orthogonal (perpendicular) to a.

    Note: If your vector a is normalized, like in your example you gave, you don't need to divide out by the magnitude squared. That is the general case when you don't have a unit vector to work with.



    If you have any other questions please feel free to ask.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    The answers are in the back of the book and/or on the website mentioned in the book.

  4. #4
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    Thank you very much Bubba; I don't have any answers in the back of my book, and I checked the website. Thanks for the support.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Looking for a 3d math backup book.
    By indigo0086 in forum Game Programming
    Replies: 2
    Last Post: 06-21-2008, 08:02 PM
  2. 3d math tutorials up
    By confuted in forum Game Programming
    Replies: 35
    Last Post: 09-03-2003, 06:51 AM
  3. Min Math level req for 3d graphics?
    By EvBladeRunnervE in forum Game Programming
    Replies: 12
    Last Post: 02-24-2003, 10:32 PM
  4. 3D Math translations
    By Crossbow in forum Game Programming
    Replies: 2
    Last Post: 07-18-2002, 09:39 PM
  5. 3d engines
    By Unregistered in forum Game Programming
    Replies: 7
    Last Post: 12-17-2001, 11:19 AM