📜  内接在给定半径的圆内的三个等半径的切圆的半径

📅  最后修改于: 2021-10-23 08:44:17             🧑  作者: Mango

这里给出的是一个给定半径的圆。在其内部,内接三个等半径的切圆。任务是找到这些切圆的半径。
例子:

Input: R = 4
Output: 1.858

Input: R = 11
Output:: 5.1095

方法

  • 设切圆的半径为r ,外接圆的半径为
    Rx是到切圆圆周和外接圆中心的较小距离。
  • 从图中可以很清楚地看出,
    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

如果您希望与专家一起参加现场课程,请参阅DSA 现场工作专业课程学生竞争性编程现场课程。