linear_interpolate_kdtree | R Documentation |
This method uses inverse distance weight interpolation within a triangle. First, the face of the mesh
that the query_coordinate
falls into is determined. Then results in 3 vertices with respective per-vertex data, and a query coordinate. We then compute the distance to all 3 vertices, and perform inverse distance weight interpolation with a beta setting defined by parameter iwd_beta
.
linear_interpolate_kdtree( query_coordinates, mesh, pervertex_data, iwd_beta = 2, ... )
query_coordinates |
nx3 numerical matrix of x,y,z coordinates. These are typically the vertex positions of a second (spherical!) mesh for that you need per-vertex data (e.g., the |
mesh |
fs.surface instance, see |
pervertex_data |
numerical vector, the continuous per-vertex data for the vertices of the mesh. |
iwd_beta |
scalar double, the |
... |
ignore, passed on to internal function |
named list with entries: 'interp_values', the numerical vector of interpolated data at the query_coordinates. 'nearest_vertex_in_face' the nearest vertex in the face that the respective query coordinate falls into, 'nearest_face' the index of the nearest face that the respective query coordinate falls into.
The mesh must be spherical, and the query_coordinates
must also be located on the mesh sphere.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.