Results 1 to 9 of 9

Thread: Vector Math (hard ...at least to me)

  1. #1

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181

    Unhappy Vector Math (hard ...at least to me)

    hey everyone
    I have a question in vector math.
    Alright I got a trapezium from intersecting a plane with a (quadratic)pyramid. Now I believe to remember from game programming that it is possible to translate the four points restricting this trapezium to the x1,x2 plane by multiplying those points (actually their position vectors) with a matrix...
    well my questions:
    1) Can this be done
    2) How do I do it (get the matrix)

    Thanks in advance
    Sanity is a full time job

    Puh das war harter Stoff!

  2. #2
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555
    Take your plane.
    1) Translate it so that it passes through the origin.
    2) Rotate around the x2 axis so that it intersects with the line x2=0,x3=0 (the x1 axis)
    3) Rotate around the x1 axis so the plane intersects with the x2 axis.
    4) apply those same transformations to your trapezium.

    Gotta run, or would explain it more. If you don't understand, someone else will probably clarify before I get a chance to get back here.

    Good luck!

  3. #3

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    thanks, but isn't there a possibility after having found out how to do those transformations to fill a matrix with numbers (according to those transformations) and than just multiplying this matrix with the position vectors to have the same transformation done...
    Sanity is a full time job

    Puh das war harter Stoff!

  4. #4
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372
    Do you mean an orthogonal projection?
    If so then you just multiply each vector with
    Code:
    _     _
    | 1 0 0 |
    | 0 1 0 |
    | 0 0 0 |
    --   --

  5. #5

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Alright, I think that's what I need, it's late though, I am going to check it out tomorrow..
    thanks...
    Sanity is a full time job

    Puh das war harter Stoff!

  6. #6

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    alright... this is not what I meant.. I was really tired when I read this and than my pc was broke the last days
    (defekt motherboard kind of gives you troubles )
    well I will try to clarify..
    I want to know how to fill a matrix that I need to multiply the vectors on a plane with so they are all on the x1 x2 plane... so they look to me just like they would look when looking at them from their plane's normal...
    Sanity is a full time job

    Puh das war harter Stoff!

  7. #7
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372
    So you want a linear transformation from R3 to R2?

  8. #8
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573
    Try this. I'm not 100% sure it hasn't any flaws / typos / mistakes of any kind, but offhand I think it's correct.
    I assume you have already calculated the 4 intersection points. Now, follow the attached image.
    Attached Images Attached Images  

  9. #9

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    alright cool
    I took a brief look and I think it is what I want...
    need to take a closer look...
    I screwed up a math exam because of a little mistake... (coulnd't go any further because I got some odd shaped intersection while I was supposed to get something pretty simple... I found the mistake, but did not have enough time after that... to do the rest...
    so it will take me a few days to cool down till I do math for fun again...

    thanks for the help, I think it's the right thing... I will drop a line after further examination
    Sanity is a full time job

    Puh das war harter Stoff!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width