I'm slightly out of my comfort zone with this one. I need to produce a function for use in an animation, but a sine wave isn't quite right. I tried adding a square wave, but that didn't work either. What think I need is a "squashed" sine wave, or one that is compressed, similar to the blue line in the image above, could anybody tell me what the formula is that I need?
Addition: I need the formula to be a drop-in replacement for sin(x), having the same period and amplitude.
You could try $\sqrt[n]{\sin(x)}$, it should do the trick. Recommended you use odd values for $n$.