I am trying to figure out how to obtain a smooth sawtooth curve, with the steep end pointing at a certain direction (in this case; shallow water). Math was always my weakest, so maybe one of you can help me out. Also, the formulas found need to be translated to TG functions.
Here's a formula for a smooth sawtooth: p(x)=x(1−x2n) , where n gives the sharpness of the sawtooth curve. I guess p to be the height. I think n should be derived from the underlying ground, so if that's higher (nearer coast), the sawtooth gets sharper. It would be awesome if a transition could be made from sinus to sawtooth, based on underlying ground altitude.
I will get to work with this, but any TG translations of this would be most welcome.