If you want to interpolate the value of Y when X is 1.5, you should use the closest data points around X = 1.5, which are (1, 2) and (2, 4).
The resample function for trajectories is great, however currently only linear interpolation and ffill are supported. This is sufficient if the trajectories have a high resolution because normally, I ...