SOLUTION: How to draw 7 identical circles, with 6 touching the central circle. Circle=polygon of large no side, say 360. Kindly send me the code in C++.

Algebra.Com
Question 1151686: How to draw 7 identical circles, with 6 touching the central circle. Circle=polygon of large no side, say 360.
Kindly send me the code in C++.

Answer by Edwin McCravy(20060)   (Show Source): You can put this solution on YOUR website!
To draw this "Vienna sausage" arrangement:

 

You just need the coordinates of the centers and the radius. If you use 1 for
the radius and coordinate axes, you get this:

 

As you see, the centers form a regular hexagon, which is made up of 6
equilateral triangles, and each equilateral triangle is made up of 2
30°-60°-90° right triangles.  So there are 12 30°-60°-90° right triangles.

I used the radius of the circles as 1, but you can make it anything you like.

The shortest side of a 30°-60°-90° triangle is 1 times the length of the radius.
The medium side is sqrt(3) times the length of the radius,
The longest side (the hypotenuse) is 2 times the length of the radius.

That's all you need to write up the C++ coding.

Edwin

RELATED QUESTIONS

draw the outer circle of raius 3cm.then draw six identical smaller circles touches it... (answered by Fombitz)
draw a big circle 1 and draw another smaller circle 2 to the right of the big circle 1... (answered by Edwin McCravy)
If I were to draw a ten sided polygon with each side measuring 13' 3/4" long, how big of... (answered by Alan3354)
Two circles touch externally with their radius being 25 and 9 cm. A common tangent is... (answered by Edwin McCravy)
In the two concentric circles with center O, the radius of the large circle is twice the... (answered by Fombitz)
if u have a circle with the diameter of 7 inches in square with sides measuring 7 inches... (answered by josmiceli)
1. if a circle is inside a trapazoid(touching its sides) with one base 45 and the other... (answered by venugopalramana)
3. A dart hits a dartboard that is in the shape of a square with sides of 4 m. There are... (answered by stanbon)
Please try and help me with this problem. What is the probability that a dart thrown... (answered by solver91311)