Nonlinear dependence on continuous variable: alternative to ancova? I have data that looks something like this:

I was hoping to run ancova, but the data is not linear in the continuous variable, and there isn't an obvious transform to apply.
However, each group is roughly a shifted version of the other (I have drawn it more stark than it actually is, to highlight this point: the data is more messy). I bring this up partly because I wonder if there is some trick/transform that can be done to turn this into a valid ancova problem.
If not, what kind of analysis am I looking at if I want to know if there is an effect of group, and of the continuous variable, on the dependent variable?
One thing I have thought of is just binning the continuous variable into bins large enough such that the continuous variable isn't changing within a bin, and run 2-way anova. This seems sort of cheap, but would work and be simple and easy, and so is what I'm leaning toward.
[Edit: I was initially thinking I could shift them all to the dataset mean, do a spline interpolation, and subtract each data point from this spline. I could then reverse the shift for each group and run ancova on this transformed data. I now see that's invalid because that would destroy any chance of finding dependence on the covariate, as it would effectively make the line flat, even if there is clearly strong dependence on the covariate.]

If your three colors were just diagonal lines with roughly the same slope, the obvious approach would be ANCOVA to force the slopes to be the same but allow for three parallel lines.
Your situation is surprisingly similar: you have three trends that are roughly the same, just shifted up and down. If you want to model that trend, regression splines could be a good way to go. Then you use the factor variable to shift the joint trend up and down.
Much like ANCOVA can be extended with an interaction term to allow for the slopes to differ, you can interact the splines with the factor variable to allow for different trends for each color, in addition to a vertical shift. This does not appear to be what you want to do, but I find it worthwhile to mention this as a possibility.
If you do work like this a lot, you might be interested in the field of functional data analysis.
