In details

Midpoint


Given the points THE(xTHE, yTHE), B(xB, yB) and Pwhich divides in half, we have:

Like this:

Thus, the midpoint coordinates are given by:

Next: Baricenter of a Triangle