# Sinusoidal damping from distance object (Wave function - Geometry Nodes)

I am attempting to replicate blenders wave modifier using geometry nodes but have run into a hurdle trying to implement damping(fall off), due to a limited understanding of maths.

I'm combining these two techniques to try and achieve this:

Control falloff geometry node setup

This is my current attempt:

The wave is working but the frame labeled "Not Sure" is the attempt at damping and it essentially does nothing.

EDIT:

After some experiments I've managed to get the damping to work as intended but it does not follow the empty.

Any advise on where I've gone wrong in my graph, would be greatly appreciated as I've sunk quite a few hours into this.

Would it help if I shared the .blend?

Thank you!

The function, as graphed, is of t, which is [distance-to-0], (along the X axis). So we just have to substitute [distance-to-Empty] for t, giving ourselves the option of scaling and/or shifting it along the way: