working polynomial fit for leading edge and midline