Krion Posted April 24, 2019 Share Posted April 24, 2019 (edited) Was wondering this when I learned about length vector functions in a tutorial.. Edited April 24, 2019 by that Abstract guy Quote Link to comment Share on other sites More sharing options...
bonsak Posted April 24, 2019 Share Posted April 24, 2019 (edited) Because the three values defines an imaginary line going from 0,0,0 to the position in space described by the 3 values. That point can be far away or i can be close to 0,0,0. This way the 3 values are able to define both a direction and a length. -b Edited April 25, 2019 by bonsak 4 Quote Link to comment Share on other sites More sharing options...
kleer001 Posted April 24, 2019 Share Posted April 24, 2019 length = square root of (x^2 + y^2 + z^2) direction = normalize (x,y,z) [puts that point on the surface of a unit sphere] https://www.3dgep.com/3d-math-primer-for-game-programmers-vector-operations/ You should check out dot and cross product too: https://betterexplained.com/articles/cross-product/ 1 Quote Link to comment Share on other sites More sharing options...
schwungsau Posted April 24, 2019 Share Posted April 24, 2019 go through first 3 chapters here: http://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/geometry/points-vectors-and-normals it good explansion about vector's, Normal's etc... 1 Quote Link to comment Share on other sites More sharing options...
Krion Posted April 24, 2019 Author Share Posted April 24, 2019 Thanks for the answers and resources all of you! Quote Link to comment Share on other sites More sharing options...
probiner Posted April 24, 2019 Share Posted April 24, 2019 (edited) There's ways to decompose/describe a vector - 3 coordinates (xyz) that scale the coordinate system unit vectors (ijk) and add them together: P = i*x + j*y + k*z. - direction (vector scaled to length 1) and legth/magnitude (distance from tail to head of the vector) - direction (two angles) and length And more... It's all about using the representation that is more sensible to the operation you are doing. For angular related calcs direction is handy, while for position calcs you want to deal with xyz, etc. Edited April 25, 2019 by probiner 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.