4
$\begingroup$

In an application of the Manhattan Distance trough the haversine formula, I was stuck in a problem that doesn't allow me to compute the right distance among two points in a space.

Despite the scope, it could be useful to many other applications, so I'm trying to find a "good enough" solution of this tedious problem.

Take a look at this simple picture to easily understand the problem: right triangles with same hypotenuse

There are two right triangles, one red and one blue, which have the same hypotenuse but different legs and legs ratios. The two legs of the red triangle are known, so it is easy to compute both hypotenuse and angles gamma and beta, but what is important for me is the computation of c and d which are the legs of the blue triangle.

There doesn't exist a same ratio among the red legs and the blue ones (such as 16:9 in TV monitors), so it is probably impossible to solve this problem, but maybe I'm wrong.

I spent some time trying to compute alpha and now I think that this is impossible, I know that putting alpha equal to 45° I will be able to compute c = d but this is not the solution that I want, as you can see the blue legs are different each other.

If you have any idea concerning this problem please let me know your POV, I will appreciate because I was not able to find any suggestion. THANK YOU

$\endgroup$
  • $\begingroup$ Something is wrong in your picture because in the red triangle $a^2+b^2\neq h^2$ so it can't be right-angled. $\endgroup$ – nickgard Apr 30 '17 at 16:29
  • $\begingroup$ Yes you are right, h = 202.4277649 but I still need to compute c and d. Thank you. Actually that 202 was written by me just to let you understand that it can be easily computed $\endgroup$ – piezzoritro Apr 30 '17 at 16:32
  • 1
    $\begingroup$ maybe de.wikipedia.org/wiki/Sinussatz can help $\endgroup$ – mathreadler Apr 30 '17 at 16:56
  • 1
    $\begingroup$ In the specific instance in the picture, an integer solution is $c=129, d=156$ because $129^2+156^2=24^2+201^2$. I just did this by brute force. I don't know if there's a specific method. It seems like this would be a hard problem for very large integers. $\endgroup$ – nickgard Apr 30 '17 at 18:07
  • $\begingroup$ Thank you @nickgard, actually I don't really need integers value, but instead I need a unique value of (c+d) which of course doesn't exists because (c+d) it seems ranged in the interval [ sqrt(40977) ; sqrt(2*40977) ], this problem hence is not solvable at all. Thanks again for your support $\endgroup$ – piezzoritro Apr 30 '17 at 18:12
2
$\begingroup$

This is definitely impossible, as there are infinitely many different values of $c$ and $d$ that could be legs of a right triangle with a given hypotenuse length. See the animation below: if point $P$ is anywhere on the circle whose diameter is the hypotenuse of your known triangle, then the diagram satisfies the conditions of your problem. More specifically, in terms of your diagram, $c$ can be any value between $0$ and $\sqrt{40977}$ (which is the length of your hypotenuse); then $d$ would be $\sqrt{40977-c^2}$. enter image description here

$\endgroup$
2
$\begingroup$

To know all sides of a triangle you must know either:

  1. One side and two angles, or

  2. Two sides and one angle, or

  3. Three sides

You only know one side and one angle. Ergo, you cannot compute any further sides in the blue triangle.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.