Please How to convert linear line to curve line in terrain
Looks like a job for smoothstep
.
Three.js has it in MathUtils
Example of the using of this function is in one of your topics about terrain: How to create curved trenches in terrain? - #2 by prisoner849
See the codepen provided in my reply, line 97 in the JS section.