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