Tejas Somaiya Tejas Somaiya - 7 months ago 12
Python Question

How do you find a point where 2 points meet at a right angle in Python?

As shown in image, I need to find point P3 in Python.

Thanks

enter image description here

Answer

In a usual (x,y) Cartesian coordinate system(*), the point P3 is at coordinates (P2.x, P1.y)

enter image description here

(*) thanks to TigerHawk and Selcuk for their added precision.

Comments