how to find equation of curve with two points