<legend id='xJBQN'><style id='xJBQN'><dir id='xJBQN'><q id='xJBQN'></q></dir></style></legend>

<small id='xJBQN'></small><noframes id='xJBQN'>

        <bdo id='xJBQN'></bdo><ul id='xJBQN'></ul>
      1. <tfoot id='xJBQN'></tfoot>

      2. <i id='xJBQN'><tr id='xJBQN'><dt id='xJBQN'><q id='xJBQN'><span id='xJBQN'><b id='xJBQN'><form id='xJBQN'><ins id='xJBQN'></ins><ul id='xJBQN'></ul><sub id='xJBQN'></sub></form><legend id='xJBQN'></legend><bdo id='xJBQN'><pre id='xJBQN'><center id='xJBQN'></center></pre></bdo></b><th id='xJBQN'></th></span></q></dt></tr></i><div id='xJBQN'><tfoot id='xJBQN'></tfoot><dl id='xJBQN'><fieldset id='xJBQN'></fieldset></dl></div>
      3. 找到包含其他圆圈的最小圆圈?

        Finding the smallest circle that encompasses other circles?(找到包含其他圆圈的最小圆圈?)
          • <bdo id='rJGgN'></bdo><ul id='rJGgN'></ul>

            <small id='rJGgN'></small><noframes id='rJGgN'>

              <tfoot id='rJGgN'></tfoot>
                  <tbody id='rJGgN'></tbody>
                <i id='rJGgN'><tr id='rJGgN'><dt id='rJGgN'><q id='rJGgN'><span id='rJGgN'><b id='rJGgN'><form id='rJGgN'><ins id='rJGgN'></ins><ul id='rJGgN'></ul><sub id='rJGgN'></sub></form><legend id='rJGgN'></legend><bdo id='rJGgN'><pre id='rJGgN'><center id='rJGgN'></center></pre></bdo></b><th id='rJGgN'></th></span></q></dt></tr></i><div id='rJGgN'><tfoot id='rJGgN'></tfoot><dl id='rJGgN'><fieldset id='rJGgN'></fieldset></dl></div>
              1. <legend id='rJGgN'><style id='rJGgN'><dir id='rJGgN'><q id='rJGgN'></q></dir></style></legend>

                1. 本文介绍了找到包含其他圆圈的最小圆圈?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  If a circle is defined by the X, Y of it's center and a Radius, then how can I find a Circle that encompasses a given number of circles? A single circle that is the smallest possible circle to completely contain 2 or more circles of any size and location.

                  At first I tried just encompassing 2 circles by finding the midpoint of the centers and that being the midpoint of the new circle while the radius was equal to the half of the radius of the 2 initial circles and half the distance between their centers, but somehow it always turned out to be a little off. The problem always seemed to be a problem with finding the radius, but I have such a headache about this I can't make it work.

                  I don't necessarily need a method for finding a circle that encompasses 3 or more circles. I can find a circle that encompasses 2, take that circle and encompass it with another, and another, and the final circle should encompass all circles given throughout the steps.

                  解决方案

                  Given two circles, with centers [x1,y1], [x2,y2], and radii R1 and R2. What is the center of the enclosing circle?

                  Assume that R1 is no larger than R2. If the second circle is the smaller, then just swap them.

                  1. Compute the distance between centers of the circles.

                    D = sqrt((x1-x2)^2 + (y1-y2)^2)

                  2. Does the first circle lie entirely inside the second circle? Thus if (D + R1) <= R2, then we are done. Return the larger circle as the enclosing circle, with a center of [x2,y2], with radius R2.

                  3. If (D+R1) > R2, then the enclosing circle has a radius of (D+R1+R2)/2

                  In this latter case, the center of the enclosing circle must lie along the line connecting the two centers. So we can write the new center as

                  center = (1-theta)*[x1,y1] + theta*[x2,y2]
                  

                  where theta is given by

                  theta = 1/2 + (R2 - R1)/(2*D)
                  

                  Note that theta will always be a positive number, since we have assured that (D+R1) > R2. Likewise, we should be able to ensure that theta is never larger than 1. These two conditions ensure that the enclosing center lies strictly between the two original circle centers.

                  这篇关于找到包含其他圆圈的最小圆圈?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Performance overhead of using attributes in .NET(在 .NET 中使用属性的性能开销)
                  Accessing attribute info from DTE(从 DTE 访问属性信息)
                  c# Hide a property in datagridview with datasource(c#使用数据源隐藏datagridview中的属性)
                  Extract Display name and description Attribute from within a HTML helper(从 HTML 帮助器中提取显示名称和描述属性)
                  C# Attributes and their uses(C# 属性及其用途)
                  C# - Getting all enums value by attribute(C# - 按属性获取所有枚举值)

                    • <small id='kFSGi'></small><noframes id='kFSGi'>

                      1. <legend id='kFSGi'><style id='kFSGi'><dir id='kFSGi'><q id='kFSGi'></q></dir></style></legend>

                            <bdo id='kFSGi'></bdo><ul id='kFSGi'></ul>

                          • <tfoot id='kFSGi'></tfoot>
                              <tbody id='kFSGi'></tbody>
                            <i id='kFSGi'><tr id='kFSGi'><dt id='kFSGi'><q id='kFSGi'><span id='kFSGi'><b id='kFSGi'><form id='kFSGi'><ins id='kFSGi'></ins><ul id='kFSGi'></ul><sub id='kFSGi'></sub></form><legend id='kFSGi'></legend><bdo id='kFSGi'><pre id='kFSGi'><center id='kFSGi'></center></pre></bdo></b><th id='kFSGi'></th></span></q></dt></tr></i><div id='kFSGi'><tfoot id='kFSGi'></tfoot><dl id='kFSGi'><fieldset id='kFSGi'></fieldset></dl></div>