I'm working in a 3D application and I'm trying to average scale values together, but I'm missing a step.
The x, y, z scale values in my problem will all be the same so even though my values will be used in the form vector$(1, 1, 1)$, for this discussion we'll just need to look at one axis.
Background: a standard scale value is $1$, which means an objects size is multiplied by that value to get it's world size.
If I want to average two objects' scale factors to generate a third object that has a size right in the middle of the first two, you might think we could just average the values together.
Let's try that: Object 1: scale = $2$, Object 2: scale = $4$, so $\cfrac{2 + 4}{2} = 3$
Okay, that worked fine. The new object has a scale of 3, which will size it right in the middle.
Now, let's try another example: Object 1: scale = $1$, Object 2: scale = $4$, so $\cfrac{1 + 4}{2} = 2.5$
Oops! The answer needs to be 2 because an object scaled to 2 will be twice the scale of the object scaled to 1, and half the scale of the object scaled to 4.
Hmmm....what to do?
Also, It needs to work with any number of floating point values.
Example: Object 1: scale $1$, Object 2: scale $4$, Object 3: scale $8$ so $\cfrac{1 + 4 + 8}{3} = 4.333$
Answer needs to be $4$.
I'm having a mental block on this one.
Any ideas?
Thanks.