Equation for calculate right triangle's third point, Other 2 points and all three sides are known

98 Views Asked by At

I am having right triangle. Length of all sides of this triangle are known. Two vertices from three of triangle are known. I want to calculate third vertex which is creating right angle in this triangle. what equation or formula i can use to calculate this point. below is graphical representation of my problem. Please help.

enter image description here

Known values are:

  • Point P(px, py)
  • Point O(cx, cy)
  • Angle PTO = 90°
  • side PT
  • side OP
  • side OT
  • Point B(bx, by)

I want to calculate coordinate of point T(?, ?).