javascript - Glitches with Triangulation + Linear Interpolation + 3D projection -
intro hey! some weeks ago, did small demo js challenge. demo displaying landscape based on procedurally-generated heightmap . display 3d surface, evaluating interpolated height of random points ( monte-carlo rendering ) projecting them. at time, aware of glitches in method, waiting challenge on seek help. i'm counting on you. :) problem so main error can seen in following screenshot: screenshot - interpolation error? http://code.aldream.net/img/interpolation-error.jpg as can see in center, points seem floating above peninsula, forming less-dense relief . obvious sea behind, because of color difference, though problem seems global. current method surface interpolation to evaluate height of each point of surface, i'm using triangulation + linear interpolation barycentric coordinates, ie: i find in square abcd point (x, y) is , a = (x,y), b = (x+1, y), c = (x, y+1) , d = (x+1, y+1) , x , y being truncated value of x, y . (each point mapped heig...