Before I address any 3D stuff in this blog I am going to review the process of obtaining normalized 3D vectors. It is not difficult, but with my penchant to forget everything in five minutes, I consign it to posterity in this post. Below are 3 distances (X, Y, Z) of a 3D vector. The object is to normalize each of them as if the total length (of a 3D hypotenuse) were one;
(X, Y, Z)
(5.4, 3.7, 6.2)
Obtain the true total length...
sqrt(5.4² + 3.7² + 6.2²) = 9.0161
Now simply divide each component by the total length...
5.4 / 9.0161 = 0.5989 (for X)
3.7 / 9.0161 = 0.4104 (for Y)
6.2 / 9.0161 = 0.6877 (for Z)
So our vector, normalized to one, now looks like;
(0.5989, 0.4104, 0.6877)
And that is it, basically.
No comments:
Post a Comment