Math problem: Determine the corner radius of an inner border based on outer corner radius/thickness

Posted by chaiguy on Stack Overflow See other posts from Stack Overflow or by chaiguy
Published on 2010-05-28T20:12:26Z Indexed on 2010/05/28 20:32 UTC
Read the original article Hit count: 602

Filed under:
|
|
|
|

Here's a math/geometry problem for the math whizzes (not my strongest subject). This is for WPF, but should be general enough to solve regardless:

I have two embedded Border elements, with the outer one having a certain corner radius, R and border thickness, T. Given these two values, what should the corner radius of the inner Border, R' be set to such that the two corner edges meet with no overlap or holes?

alt text

So far I've just been eyeballing it, but if someone can give me a proper formula that would be great. Respect points if you can!! ;)

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET