How to find the projection or vertical foot of a point on a line?

by python

好吧, 这其实是个简单的几何问题如图:

可以先求出PA和PO^{[1]}的长度,然后用勾股定理求出AO的长度,再用Helper.p2pexLine(), 就可以求出来了. 方法有点笨…不知道谁还有更好的方法呢?

Well, this is actually a simple geometric problem as shown in the figure: You can first find the lengths of PA and PO[1], then use the Pythagorean theorem to find the length of AO, and then use Helper.p2pexLine(), you can find it . The method is a bit stupid…do not know who has a better method?