I was looking around the internet and couldn't find a perfect algorithm for this particular problem:
Our customer have a set of points and weight data along with each point as can be demonstrated by this image:
weighted points http://chakrit.net/files/stackoverflow/so_heightmap_points.png
Of which, we have a GIS program that could generate a "heightmap" or a sort of terrain data from these points and their weight values but as we have near a thousand points of data and that these will change over time, we would like to create our own tools to auto-generate these heightmaps.
So far, I've tried to calculate the weight for each pixel from its distance to the closest data point with Sqrt((x1 - x2) ^ 2 + (y1 - y2) ^ 2)
and applying weight and distance factor to the data point's color to produce the resulting gradient color for that particular pixel:
heightmap result http://chakrit.net/files/stackoverflow/so_heightmap_result.png
You can see that there are still problems with certain configuration of data points and the algorithm sometimes produce a rather polygonal image when there is a lot of data points. The ideal result should looks more like an ellipsis and less like a polygon.
Here is one example image from wikipedia article on gradient ascent which demonstrates the result I want:
mountains http://chakrit.net/files/stackoverflow/so_gradient_descent.png
The gradient ascent algorithm is not of my interest. What I'm interested in; is the algorithm to calculate the original function in that picture in the first place, provided data points with weights.
I've not taken any class in topological maths, but I can do some calculus. I think I may be missing something and am rather lost at what should I type in that Google search box.
I need some pointers.
Thanks!