Let's start with a diagram:
B-------C
/| /|
A-------* |
| *-----|-G
|/ |/
*-------*
and let's further state that AG
is your vector. For simplicity, we'll state that A
is the origin [0, 0, 0]
.
If your intent is to simply scale the values (lengths of AB
, BC
and CG
) in a linear fashion so that they total one, you simply divide each by the sum:
/ x y z \
| ----- , ----- , ----- |
\ x+y+z x+y+z x+y+z /
In your particular case where x+y+z
gives you 10
, you end up with:
[0.1, 0.4, 0.5]
which sums up to one.
That formula that you found applies to three-dimensional vectors where you want the length of the vector AG
to be one.
And the figures you have for that are (roughly) correct since the length of a vector is:
2 2 2
sqrt ( height + width + depth )
= sqrt (0.154 * 0.154 + 0.62 * 0.62 + 0.77 * 0.77)
= sqrt ( 0.023716 + 0.3844 + 0.5929 )
= sqrt ( 1.001016 )
= 1.000507871
Plugging your figures into that gives you something close to 1.0005
which is understandable given the rounding of your original numbers.
So, bottom line, if you want the length of the vector to be one, simply use the formula you posted in the question. If you want the vector co-ordinates to sum to one, just scale them based on the sum of the three co-ordinates.