後來發現 inverse distance weight 很單純,要 port 到 js 很容易