tudelft3d / terrainbook

"Computational modelling of terrains" book: source code + PDF
https://tudelft3d.github.io/terrainbook/
Creative Commons Attribution 4.0 International
104 stars 12 forks source link

Possible ommision in formula for IDW #40

Closed CorLaHu closed 1 year ago

CorLaHu commented 1 year ago

Hi, I think I may have found a small oversight in the book.

In the terrainbook under 5.3.2 there's a formula for Inverse Distance Weighting which is explained as follows:

"The weight 𝑤𝑖 (𝑥) assigned to each 𝑝𝑖 for a location 𝑥 is: 𝑤𝑖 (𝑥) = |𝑥 𝑝𝑖 |^−ℎ where ℎ defines the power to be used, and |𝑎𝑏| is the distance between two points 𝑎 and 𝑏."

Having looked further in the text, I can't find any reference to the "|𝑎𝑏|" and not in the formula given itself either, unless it is meant to be understood implicitly. I thought it wise to create an issue regarding this in case it isn't.

I hope this feedback is useful. Thanks for making the terrainbook openly available and for your time in making it.

hugoledoux commented 1 year ago

thanks for reporting this.

$|ab|$ is the distance between 2 points ( $a$ and $b$), but there those should be interpreted as generic variables. In our specific case, $a=x$ and $b=p_i$