Results 1 to 13 of 13

Thread: Vectors

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Resolved Vectors

    Does vectors have a position at all? If I have understood it right a normal vecotor doesn't unless it is a free vector (zero vector). Am I on the right track here?
    Last edited by NoteMe; Nov 30th, 2004 at 11:22 PM.

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Vectors don't really have a position, they are used to describe a position (relative to something, possibly the origin) or a direction.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  3. #3

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Yeah I know that vecotrs have a direction, and a length, and that is what I have used it for. But I have started some new tutorials (going to be DX tutorials, but first I want to explain some of the math) and in one of the books I am using for reference it says:

    Vectors are not only used to define the position of vertices, they are also used to define a direction

    And they are not explaining it any furuther. But the last section in front of it talked about free vectors/zero vectors. So maybe thats the only vectors that defines a point....not sure...never thought about them that way before.

  4. #4
    Fanatic Member
    Join Date
    Dec 2003
    Posts
    703
    It's very simple. A (position) vector, say (3,2,1) can be said to define a point at x=3,y=2,z=1 from the origin (0,0,0). There's nothing complex about it - you likely know all you need to.
    an ending

  5. #5

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Originally posted by azteched
    It's very simple. A (position) vector, say (3,2,1) can be said to define a point at x=3,y=2,z=1 from the origin (0,0,0). There's nothing complex about it - you likely know all you need to.

    Yeah that is a free vector or a / zero vector. But if you have 2 points (and non of them is origo) and use subtraction to find the vector between those points. Can you still say that that vector has a position.

  6. #6
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Posted by NoteMe
    Yeah that is a free vector or a / zero vector. But if you have 2 points (and non of them is origo) and use subtraction to find the vector between those points. Can you still say that that vector has a position.
    Doing that will give you a position vector which will describe the direct one of those points is from the other one. This vector doesn't have a position but the point it is pointing to is merly for showing the relative position of the two vectors.

    I'll do an example and a pic one sec....
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  7. #7
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349


    On here you see the Blue & Red Vectors describing positions.

    If you then subtract them you get the green vector. Interperated as a position vector it gives you the green dot but if you use it as a direction vector then it describs the motion from Blue to red or from any position in that direction for that amount. So if you are thinking of it as a direction vector it doesn't really have a position associated with it just a direction . Hope that helped .
    Attached Images Attached Images  
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  8. #8

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Got a bit confused there.....but am I right if I say that you concluded with:


    - Only free or zero vectors have a position (those who starts at origo), the rest only holds a direction and a length and are not bound to any position at all.

  9. #9
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349
    After all these years I always thought vectors only represent Direction and Magnitude. Vector's mathamatically don't have position (Remember that vector's aren't points.) Vectors are made by subtracting two points in 3D space. That means that a Vector always has a head (Point2) and a tail (Point1, which is the origin of the vector.)

    Like for example, let's say Point1 is located at (10,0,0) and Point2 is located at (30,0,0). When you create a vector, you always subtract Point2 from Point1. So that would mean:

    V.X = P2.X - P1.X
    V.Y = P2.Y - P1.Y
    V.Z = P2.Z - P1.Z
    V.W = 1

    Calculating that, your vector is now (20,0,0) . To get the magnitude of it, you do this:

    Sqr(V.X * V.X + V.Y * V.Y + V.Z * V.Z)

    Using the value we have now, the magnitude is 20 (obviosly). Playing around with the Y and Z values would increase/decrese the magnitude.

    Now saying that the vector is located at 20,0,0 wouldn't really make any sence mathamatically. It only represents Magnitude and Direction. The XYZ components of the vector were only needed to later be calculated for magnitude and direction.
    Last edited by Jacob Roman; Nov 30th, 2004 at 11:13 PM.

  10. #10

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    I found the final answer right now......happy to clear this out.



    A BOUND vecotr has these atributes:

    • A starting point
    • A final point
    • A direction
    • A magnitude



    But a free vecotr isn't the same. You don't have a starting point when you are dealing with free vectors. So what is the diffrence on a poin and a free vector. A free vector is represented additionally by magnitude and direction. The magnitude of a vector (4, 4, 4) is the distance between the origin and the final point. If you only need the final point then it is a 3D point. If you need a magnitude and direction then it is a vector.


    So now we know the truth...and I was right all the way from the start...

  11. #11
    Fanatic Member
    Join Date
    Dec 2003
    Posts
    703
    A vector is a vector is a vector for practical purposes.
    an ending

  12. #12
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Posted by NoteMe
    Got a bit confused there.....but am I right if I say that you concluded with:


    - Only free or zero vectors have a position (those who starts at origo), the rest only holds a direction and a length and are not bound to any position at all.
    Sounds like what i was saying, think this is the same thing you've put in your next post just with more words .
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  13. #13

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Originally posted by azteched
    A vector is a vector is a vector for practical purposes.

    And a free vector is a vector that saves space and calculations in a game.




    Originally posted by Electroman
    Sounds like what i was saying, think this is the same thing you've put in your next post just with more words .

    Well ok. Then I just fine-polished your answer...

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