其他两个圆的相切圆? [英] Tangent circle(s) for two other circles?

查看:135
本文介绍了其他两个圆的相切圆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有两个圆圈:以 A 为中心的 a ,以及 b (以 B 为中心) 。计算全部或无切线圆的二维位置的公式是可能的。主要的限制是,所有圆圈的半径是相同的。据我所知,应该没有解决方案(图2)或2个解决方案(图1)。如何找出这些解决方案( C D )的解决方案和位置




::2个解决方案应该可以在这里







图2 :没有解决方案!



)更新(解决方案):

1)计算从A到B的距离 - > | AB |



>

2)检查解决方案是否存在,只有在以下情况下才存在:



<3>如果存在,计算点之间的半点 A B




4 )为线段创建标准化的垂直向量 AB

| HC | .gifalt =在这里输入图像描述>





6)最后计算沿距(HC)开始的距离(HC)处的 C

解决方案


  1. 存在一个解决方案iff d(A,B)= sqrt(2)* 2 * r

  2. 要找到解决方案圆的中心,可以绘制圆形曲线,可以用圆心与(x_m,y_m) ,这是中等宝int半径 sqrt(2)* r 的线段 AB 的int,线条垂直于AB并从(x_m,y_m)

这应该会为您提供所有必要的信息检查一个解决方案exixsts,如果它确实,绘制它。


There are two circles: a centered at point A, and circle b (center at B). What is the equation to calculate 2D position of all or none tangent circles possible. Main constraint is, that radius is the same for all the circles. As far as I know, there should be either no solution (figure 2), or 2 solutions (figure 1). How to find out if there are solutions, and also position of centers of those solutions (C and D).

Figure 1: 2 solutions should be possible here


Figure 2: No solutions!

Update (solution):

1) Calculate distance from A to B -> |AB|:

2) Checks whether a solution exist, it exist only if:

3) If it exist, calculate half-point between points A and B:

4) Create normalized perpendicular vector to line segment AB:

5) Calculate distance from this H point to C point -> |HC|:

6) Finally calculate point C along the (HC) starting at X at distance |HC|:

解决方案

  1. A solution exists iff d(A,B) = sqrt(2)*2*r
  2. To find the center of the solution circles, that will let you draw the circonferences, you can intersect the circle with center (x_m,y_m), that is the medium point of the segment AB, of radius sqrt(2)*r, with the line perpendicular to AB and passing from (x_m,y_m)

This should give you all the needed information to check if a solution exixsts, and if it does, to draw it.

这篇关于其他两个圆的相切圆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆