问题描述
这是数学高手(不是我最擅长的科目)的数学/几何问题.这是针对 WPF 的,但无论如何都应该足够通用以解决问题:
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:
我有两个嵌入的边框元素,外边的元素具有一定的圆角半径,R
和边框厚度,T
.给定这两个值,内边框的圆角半径应该是多少,R'
应该设置为两个角边缘不重叠或没有孔?
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?
到目前为止,我一直在关注它,但如果有人能给我一个合适的公式,那就太好了.如果可以的话,请尊重点!;)
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!! ;)
推荐答案
T'/2 + R` = R - T/2
T'/2 + R` = R - T/2
或
对于给定的 T、R 和 T',则 R' = R - T/2 - T'/2
For a given T, R and T' then R' = R - T/2 - T'/2
因此,例如,对于 (T=10) 的外边框厚度和 (R=8) 的半径,以及 (T'=4) 的内边框厚度,您需要 1 的内边框半径.
So for instance for an outer border thickness of (T=10), and radius of (R=8), and an inner border thickness of (T'=4), you'd need an inner border radius of 1.
这篇关于数学问题:根据外角半径/厚度确定内边界的角半径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!