|
|
You must know the angle in order to solve this. Any triangle can be solved
knowing "side-angle-side" through simple trigonometry. But the simpler approach
has nothing to do with any of this. If you know point A and you know point C,
you have your answer through (as you guessed it) the Pythagorean theorem. Let's
assume that point A is represented by (x1,y1) and point C is represented by (x2,
y2). Then the distance from A to C is very simple:
X = (x2-x1)
Y = (y2-y1)
D = sqrt((X*X) + (Y*Y))
Since X may be negative or positive (and also the same is true for Y), you
may expect to take an absolute value or something, but this is not necessary.
Squaring the term automatically resolves it as a positive value. The square
root of the sums of the squares gives the distance.
Cheers!
Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip
Post a reply to this message
|
|