Given r is the radius of three equal circles touching each other. The task is to find the length of the rope tied around the circles as shown below:
Input: r = 7
Input: r = 14
Approach: As it can be clearly seen from above image, the part of the length of rope which is not touching the circle is 2r + 2r + 2r = 6r.
The part of the rope which is touching the circles make a sector of 120 degrees on each circle. Thus, three sectors of 120 degrees each can be considered as a complete one circle of 360 degrees.
Therefore, Length of rope touching the circle is 2 * PI * r where PI = 22 / 7 and r is the radius of the circle.
Hence, the total length of the rope will be ( 2 * PI * r ) + 6r.
Below is the implementation of the above approach:
- Probability of cutting a rope into three pieces such that the sides form a triangle
- Number of ways of choosing K equal substrings of any length for every query
- Path in a Rectangle with Circles
- Maximum points of intersection n circles
- Check if two given circles touch or intersect each other
- Program to calculate the area between two Concentric Circles
- Check whether given circle resides in boundary maintained by two other circles
- Check if a given circle lies completely inside the ring formed by two concentric circles
- Calculate Stirling numbers which represents the number of ways to arrange r objects around n different circles
- Program to find Length of Bridge using Speed and Length of Train
- Arc length from given Angle
- Length of longest rod that can fit into a cuboid
- Length of the Diagonal of the Octagon
- Print all sequences of given length
- Find length of period in decimal value of 1/n
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 : SURENDRA_GANGWAR