Problem description:
Reo began to dabble in geometry. He is studying the problem of pony drinking water now.
As we all know, there is a thirsty pony, a straight river and a pony's home in this problem. Pony needs to drink water by the river and then go home. It needs to take the shortest route.
Solving this problem is also very simple. One of the steps is to be the symmetry point of the pony family about the river.
Reo was a little annoyed by this. He can't do this. He wants you to help him draw a line across the pony's house, perpendicular to the river, and then tell reo where to hang his feet.
Ideas:
The linear uv slope a = (uy-vy)/(ux-vx)
The linear uv is y = a(x-ux)+uy.
The straight line xp is y = -(x-px)/a+py.
You can calculate the coordinates of x at the same time.