I'm trying to find a simple formula for an almost sinusoidal wave. If you look at the picture, there is a sinusoidal wave in green that hits all my data points on the top, as I want. However, they don't go through the bottom data points, as is necessary for this project. I know about adjusting the basic parameters of a sine wave, like amplitude, phase shift and frequency, but that only allows me to hit the data points on only the top or bottom, but not both.
Of course, since the bottom data points aren't spaced exactly between the top data points along the x-axis, there is no such sinusoidal wave that hits all the top and all the bottom points.
So, what I am looking for is a way to find a modified sinusoidal wave that has the bottom part skewed to the right a bit. It will then be closer to being a saw-tooth wave, but that's what I need.
I can use Gauss-Jordan curve-fitting, but that seems like a hack, and besides, I have to use extra points on the ends because the data-point fitting algorithm needs those so the curve doesn't "fly off" to nowhere right after it hits the end points. Using a bottom-only skewed sinusoidal wave would be more elegant.
Any ideas? I'm not sure about using some series approximation of a saw-tooth wave because it might introduce unnecessary undulations. I might be wrong though. The final form can't be pieced together, because this will be entered as a function into Fusion 360, and it needs to be continuous or the CAD software will generate an error.