fit quadratic to 3 points