[math-fun] Kraehenbuehl's harmonization algorithm