I have n number of values which each have a distance that determens how much of the amount that should be blended.
I've tried to illustrate my problem visually: The blue numbers is the values, the white numer is the distance. and the orange is the result i would like the function to produce.
If each value, was an RGB Struct, and the function i'm looking for where to be run for each point within 3 points that makes up a triangle, the result should look somewhat like this:
So how would i mathmaticly blend these values, by only knowing their distance to the green dot? Hope you can help and my question issn't too stupid. Thanks!