📜  半径相等的三个内切圆的半径相等的半径

📅  最后修改于: 2021-04-29 09:07:29             🧑  作者: Mango

给定的是给定半径的圆。在其中刻有三个相等半径的切线圆。任务是找到这些切圆的半径。
例子:

Input: R = 4
Output: 1.858

Input: R = 11
Output:: 5.1095

方法

  • 设切圆的半径为r ,外接圆的半径为
    R。 x是从切圆的圆周到外接圆的中心的较小距离。
  • 从图中可以很清楚地看出,
    2r + x = R
  • 现在处于OBC三角形中,
    cos 30 = r /(r + x)
    rcos30 + xcos30 = r
    x = r(1-cos30)/ cos30
  • 同样, x = R-2r
  • 所以,
    R-2r = r(1-cos30)/ cos30
    R-2r = 0.133r / 0.867
    R-2r = 0.153r
    R = 2.153r
    因此, r = 0.4645R

Radii of three tangent circles = 0.4645*radius of the circumscribed circle

C++
// C++ program to find the radii
// of the three tangent circles
// of equal radius when the radius
// of the circumscribed circle is given
 
#include 
using namespace std;
 
void threetangcircle(int R)
{
    cout << "The radii of the tangent circles is "
         << 0.4645 * R << endl;
}
 
// Driver code
int main()
{
    int R = 4;
    threetangcircle(R);
    return 0;
}
Java // Java program to find the radii
// of the three tangent circles
// of equal radius when the radius
// of the circumscribed circle is given
import java.io.*;

class GFG 
{

static void threetangcircle(int R)
{
    System.out.print("The radii of the tangent circles is "
        + 0.4645 * R);
}

// Driver code
public static void main (String[] args) 
{
    int R = 4;
    threetangcircle(R);
}
}

// This code is contributed by anuj_67..


Python3
# Python3 program to find the radii
# of the three tangent circles
# of equal radius when the radius
# of the circumscribed circle is given
 
def threetangcircle(R):
    print("The radii of the tangent",
          "circles is ", end = "");
    print(0.4645 * R);
 
# Driver code
R = 4;
threetangcircle(R);
 
# This code is contributed
# by Princi Singh


C#
// C# program to find the radii
// of the three tangent circles
// of equal radius when the radius
// of the circumscribed circle is given
using System;
 
class GFG
{
 
static void threetangcircle(int R)
{
    Console.WriteLine("The radii of the tangent circles is "
        + 0.4645 * R);
}
 
// Driver code
public static void Main ()
{
    int R = 4;
    threetangcircle(R);
}
}
 
// This code is contributed by anuj_67..
PHP 


Javascript


输出:
The radii of the tangent circles is 1.858