views:

82

answers:

1

i'm not sure how to solve the following problem:

i have a triangle with each of the three known vertex positions A,B,C being inaccurate, meaning they can each deviate up to certain known radii rA, rB, rC into arbitrary directions.

given such a triangle, i want to calculate how much the difference of two specific edge lengths (for instance the difference between lengths of edge a and edge b) of the triangle may change in the worst case. is there any elegant mathematical solution to this problem?

the naive way i thought of is calculating all 360^3 angle combinations and measuring the edge differences for each case, which is a rather high overhead.

+4  A: 

The following image illustrates the solution:

MinMaxEdgeDiff.png

Some points to note:

  1. Line segments AC1 and BC1 represent the largest possible value of |BC| - |AC|, while lines AC2 and BC2 represent the smallest possible value. At C1, the tangent to the circle must bisect the angle made by AC1 and BC1; likewise for C2.
  2. AC1 (when extended via the dashed line) and AC2 both go through A. Likewise, BC1 and BC2 go through B. Any deviation from the center, and the lines would longer be maximally long or minimally short.
  3. The largest and smallest differences are:

    d1 = |BC1| - |AC1| = (|B->C1| + _rB_) - (|A->C1| - _rA_)
                       = |B->C1| - |A->C1| + (_rA_ + _rB_)
    
    
    d2 = |BC2| - |AC2| = (|B->C2| - _rB_) - (|A->C2| + _rA_)
                       = |B->C2| - |A->C2| - (_rA_ + _rB_)
    

    Thus the variation between the largest and smallest differences is:

    d1 - d2 = (|B->C1| - |A->C1|) - (|B->C2| - |A->C2|) + 2*(_rA_ + _rB_)
    

The last point hints that the solution can be found by solving from the centers A and B, and then adding the radii rA and rB. Thus the locations of C1 and C2 may be discovered iteratively (and separately, since they are independent of each other) by varying just a single angle around C's bounding circle.

I suspect that there's an analytical solution. It's an interesting problem, but not enough for me to bash my head against this particular task. Sorry. ;-)

Marcelo Cantos
thank you very much for the illustrative and detailed answer!i had totally overlooked that last point!
stingrey
No problems, @stingrey. BTW, I've fixed up the math slightly (nothing major; I just swapped d1 and d2 in the subtraction to better match the discussion).
Marcelo Cantos
+1 Diagram looks cool. Any tool you used?
TheMachineCharmer
I used LineForm for the Mac. It's a crude, simple tool, but good for quick and dirty illustrations.
Marcelo Cantos