Calculating something problem ...

Miscellaneous Forums/General Discussion/Calculating something problem ...

Right, given this ickle problem has me stumped!..

Imagine a triangle, of point A,B,C. You know the distance from point A to point B and also you know the distance from point A to point C, how would you calculate the distance from point B to point C ?. I presume it must be possible, but my brain is escaping me at the moment...


distance_a_to_b = 12.1
distance_a_to_c = 14.7

distance_b_to_c = ????



It's possible to calculate it only if the angle CAB is also known.

Now come to think of it, i can see i need the angle!.

haha yep impossible without and angle as the lines could be way apart or very close haha. You could probably calc a Max and Min length for the other line, not that that would help.

You don't need to know the angle if you're anywhere near familiar with the Pythagorean Theorem. It can be assumed that the two known points form part of a right-angled triangle (even if they don't) to calculate the length of the hypotenuse:

Dist = Sqr((Ax-Cx^2) + (Ay-Cy^2))


Max 26.8
Min 2.6

Do you at least have the vectors for direction?

@GFK, you know what I bet thats the equation he used to get the distances he gave us at the begining.
Wow, so now that you know how he got to this point, and assuming that the qustion is After I have used the equation you have just given and gotten these two distances, how far apart are the end points?

(Now I agree that he should just keep the coordinates of b and c) However if he hasnt, then he need the angle between AC and AB

He said he knows the distance from point A to B, and point A to C, therefore one would assume that he must know where those points are, in order to do those calculations in the first place.

The only other way would be to use Atan2(), Sin() and Cos() to find out where points B and C are, but then he's recalculating information that he must have already known at some stage before, which is... pointless.

I agree hence my "Do you at least have the vectors for direction?"

But imagine all he has is a list of the distances from London? In that case he would not has any positional data at all?

So, .. There

well...

the line is somewhere between ab-ac and ab+ac long...

prolly doesn't help much tho.. haha

assumeing ab is larger than ac... if ac is bigger it is from ac-ab to ab+ac

in this case it is between 2.6 and 26.8

He said he knows the distance from point A to B, and point A to C, therefore one would assume that he must know where those points are, in order to do those calculations in the first place.


He didn't mention any point data, only the distances, so I didn't actually make that assumption.
As it stands, the unknown distance could be anything from 0 to 26.8 units, for an angle of 0 to 180 degrees.

However, if cartesian coodinates for all points are known, then of course the calculation of the length of the remaining side of the triangle is straightforward.

[quote]But imagine all he has is a list of the distances from London?[quote]

... would add another layer of complexity if distances are confined to the surface, since we may now have to deal with spherical geometry if the distances are large enough.... The sum of angles on a spherically arranged triangle can be greater than 180 degrees !!

He didn't mention any point data, only the distances
Then how do you suppose he calculates the distance between two points, without knowing where those points are?

Its impossible.

ab and ac are two vectors with same origin, if you need the
angle - get the acos of the dot product of those
vectors... you should be able to find all this stuff in a basic
maths textbook..

;)

oops..didnt realise he only had distance info -
heh..in which case the distance between b and c is almost anything
you like - without directional information, or positional
information...b and c could be anywhere in the 360 arc..
The only thing you can be sure of, is that
c to b is less than or equal to the total of the lengths of ab and ac..

well..actually, it is possible...but only if the problem is
one dimensional heh..

Then how do you suppose he calculates the distance between two points, without knowing where those points are?

Its impossible.


We know, you were the only one saying it was possible

You don't need to know the angle if you're anywhere near familiar with the Pythagorean Theorem


You of course where right, he then only needs two lots of positional data

yup..i shouldnt have bothered with whole dot product thing,
jst it was asked for earlier.. - heh, im crap at maths anyway,
i probably shouldnt be replying to these kind of questions ;)