Angle subtended by an arc at the centre of a circle
Last Updated :
10 Mar, 2022
Given the angle subtended by an arc at the circle circumference X, the task is to find the angle subtended by an arc at the centre of a circle.
For eg in the below given image, you are given angle X and you have to find angle Y.
Examples:
Input: X = 30
Output: 60
Input: X = 90
Output: 180
Approach:
- When we draw the radius AD and the chord CB, we get three small triangles.
- The three triangles ABC, ADB and ACD are isosceles as AB, AC and AD are radiuses of the circle.
- So in each of these triangles, the two acute angles (s, t and u) in each are equal.
- From the diagram, we can see
D = t + u (i)
s + s + A = 180 (angles in triangle)
ie, A = 180 - 2s (ii)
(t + s) + (s + u) + (u + t) = 180 (angles in triangle again)
so 2s + 2t + 2u = 180
ie 2t + 2u = 180 - 2s (iii)
A = 2t + 2u = 2D from (i), (ii) and (iii)
- Hence Proved that ‘the angle at the centre is twice the angle at the circumference‘.
Below is the implementation of the above approach:
C++
#include <bits/stdc++.h>
using namespace std;
int angle( int n)
{
return 2 * n;
}
int main()
{
int n = 30;
cout << angle(n);
return 0;
}
|
Java
import java.io.*;
class GFG
{
static int angle( int n)
{
return 2 * n;
}
public static void main (String[] args)
{
int n = 30 ;
System.out.println(angle(n));
}
}
|
Python3
def angle(n):
return 2 * n
n = 30
print (angle(n))
|
C#
using System;
class GFG
{
static int angle( int n)
{
return 2 * n;
}
public static void Main()
{
int n = 30;
Console.Write(angle(n));
}
}
|
Javascript
<script>
function angle(n)
{
return 2 * n;
}
let n = 30;
document.write(angle(n));
</script>
|
Time Complexity: O(1)
Auxiliary Space: O(1)
Share your thoughts in the comments
Please Login to comment...