Given the radius(r) of circle then find the area of square which is Circumscribed by circle.
Input : r = 3 Output :Area of square = 18 Input :r = 6 Output :Area of square = 72
All four sides of a square are of equal length and all four angles are 90 degree. The circle is circumscribed on a given square shown by a shaded region in the below diagram.
Properties of Circumscribed circle are as follows:
- The center of the circumcircle is the point where the two diagonals of a square meet.
- Circumscribed circle of a square is made through the four vertices of a square.
- The radius of a circumcircle of a square is equal to the radius of a square.
Formula used to calculate the area of circumscribed square is:
2 * r2
where, r is the radius of the circle in which a square is circumscribed by circle.
How does this formula work?
Assume diagonal of square is d and length of side is a.
We know from the Pythagoras Theorem, the diagonal of a
square is √(2) times the length of a side.
i.e d2 = a2 + a2
d = 2 * a2
d = √(2) * a
a = d / √2
and We know diagonal of square that are Circumscribed by
Circle is equal to Diameter of circle.
so Area of square = a * a
= d / √(2) * d / √(2)
= d2/ 2
= ( 2 * r )2/ 2 ( We know d = 2 * r )
= 2 * r2
Area of square = 18
Time Complexity: O(1)
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Area of a Circumscribed Circle of a Square
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Area of the circle that has a square and a circle inscribed in it
- Side of a regular n-sided polygon circumscribed in a circle
- Maximum area of a Rectangle that can be circumscribed about a given Rectangle of size LxW
- Program to calculate area of inner circle which passes through center of outer circle and touches its circumference
- Program to calculate area of an Circle inscribed in a Square
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Minimum volume of cone that can be circumscribed about a sphere of radius R
- Equation of circle when three points on the circle are given
- Check if a circle lies inside another circle or not
- Angle subtended by the chord to center of the circle when the angle subtended by the another equal chord of a congruent circle is given
- Program to find area of a circle
- Given equation of a circle as string, find area
- Area of circle inscribed within rhombus
- Area of a circle inscribed in a regular hexagon
- Area of circle which is inscribed in equilateral triangle
- Area of decagon inscribed within the circle
- Find the area of largest circle inscribed in ellipse
- Area of largest Circle inscribe in N-sided Regular polygon
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : vt_m