1 | initial version |
Not an answer, just a minor correction to your illustration: Once you have found Y1 and Y2, the formula (Y2-Y1)/2 gives you the distance between Y1 and Y3. The actual position of Y3 is that distance + Y1, which means that Y3=(Y2+Y1)/2.