The problem is that in order to decide whether the point is above or below, you need to define the exact curve instead of just a few points.
The simplest approach would be to connect the closest points with straight lines, i.e. a linear spline interpolation. Or a cubic spline if the curve needs to be smooth (you mentioned "non-linear"). Using the interpolation you can then compute y' = f(x) for the curve, and compare this with your y value.
Christoph
The simplest approach would be to connect the closest points with straight lines, i.e. a linear spline interpolation. Or a cubic spline if the curve needs to be smooth (you mentioned "non-linear"). Using the interpolation you can then compute y' = f(x) for the curve, and compare this with your y value.
var spline = Interpolate.CubicSpline(new[] {0.0, 4.0, 9.0, 16.0}, new[] {10.0, 7.0, 12.0, 10.0});
spline.Interpolate(5.0).Dump(); // 7.519
spline.Interpolate(12.0).Dump(); // 12.621
Thanks,Christoph