sinusoidal function from two points - Search