April 07, 2009
给出两个不同的圆的圆心坐标、半径,求它们公切线的方程。
两个圆的方程
\[\begin{aligned} C_1: (x - x_1)^2 + (y - y_1)^2 &= r_1^2 \\ C_2: (x - x_2)^2 + (y - y_2)^2 &= r_2^2 \end{aligned}\]定义两个参数
\[\begin{aligned} \Delta_+ &= (x_1 - x_2)^2 + (y_1 - y_2)^2 - (r_1 + r_2)^2 \\ \Delta_- &= (x_1 - x_2)^2 + (y_1 - y_2)^2 - (r_1 - r_2)^2 \\ p_1 &= r_1(x_2^2 + y_2^2 - x_1 x_2 - y_1 y_2) \\ p_2 &= r_2(x_1^2 + y_1^2 - x_1 x_2 - y_1 y_2) \\ q &= x_1 y_2 - x_2 y_1 \end{aligned}\]公切线方程
\[\begin{aligned} l_{+1} &: [ (x_2 - x_1)(r_1 + r_2) + (y_1 - y_2)\sqrt{\Delta_+} ] x + \ [ (y_2 - y_1)(r_1 + r_2) + (x_2 - x_1)\sqrt{\Delta_+} ] y - \ p_1 + p_2 + q\sqrt{\Delta_+} \\ l_{+2} &: [ (x_2 - x_1)(r_1 + r_2) - (y_1 - y_2)\sqrt{\Delta_+} ] x + \ [ (y_2 - y_1)(r_1 + r_2) - (x_2 - x_1)\sqrt{\Delta_+} ] y - \ p_1 + p_2 - q\sqrt{\Delta_+} \\ l_{-1} &: [ (x_2 - x_1)(r_1 - r_2) + (y_1 - y_2)\sqrt{\Delta_-} ] x + \ [ (y_2 - y_1)(r_1 - r_2) + (x_2 - x_1)\sqrt{\Delta_-} ] y - \ p_1 - p_2 + q\sqrt{\Delta_-} \\ l_{-2} &: [ (x_2 - x_1)(r_1 - r_2) - (y_1 - y_2)\sqrt{\Delta_-} ] x + \ [ (y_2 - y_1)(r_1 - r_2) - (x_2 - x_1)\sqrt{\Delta_-} ] y - \ p_1 - p_2 - q\sqrt{\Delta_-} \end{aligned}\]说明
不同圆的公切线 5 种情况:
顺便推出公切线交点公式:
内公切线交点:
\[x = \frac{r_1 x_2 + r_2 x_1}{r_1 + r_2}, y = \frac{r_1 y_2 + r_2 y_1}{r_1 + r_2}\]外公切线交点:
\[x = \frac{r_1 x_2 - r_2 x_1}{r_1 - r_2}, y = \frac{r_1 y_2 - r_2 y_1}{r_1 - r_2}\]这个测试过,但那么长的公式,不能保证打字不出错,用之前还是测试一下为妙~ 欢迎质疑!
求解过程吗?直接设 \(Ax + By + C = 0\) 的方法是不太可行的,提示一下: