# Circle to Hexagon Conversion [closed]

I have a set of circles defined by a Middlepoint and a radius e.g.

Circle1: x = 10, y = 10, r = 3
Circle2: x = 15, y = 2, r = 10
etc...


But I want to have them converted to Hexagons, do you know any formulas to calculate the 6 edge coordinates for them?

## closed as off-topic by Szabolcs, Edmund, m_goldberg, happy fish, C. E.Sep 28 '16 at 9:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Edmund, m_goldberg, happy fish, C. E.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Polygon[CirclePoints[6]] – george2079 Sep 27 '16 at 19:08
• Thank you for answering but how to get those 6 points is the question – LuaNoob Sep 27 '16 at 19:16
• did you read the docs for CirclePoints ? – george2079 Sep 27 '16 at 19:20
• Sorry im quite new to this, where can i find those docs? – LuaNoob Sep 27 '16 at 19:23
• type CirclePoints and press "F1". The docs are also online: reference.wolfram.com/language/ref/CirclePoints.html – george2079 Sep 27 '16 at 19:28

The documentation can be found here: CirclePoints or here: RegularPolygon. You can convert a circle into a hexagon via the replacement rule Circle[x_, y_] :> Polygon[CirclePoints[x, y, 6]], or Circle[x_, y_] :> RegularPolygon[x, y, 6]

Here it is with 7 random circles,

circles =
Table[Circle[RandomReal[{-10, 10}, 2], RandomReal[{1, 2}]], {n,
7}];
Graphics@circles


Graphics[{EdgeForm[Black], FaceForm[None],
circles /. Circle[x_, y_] :> RegularPolygon[x, y, 6]}]


• But how do I get the coordinates of them or better where can i draw them like you i cant find it – LuaNoob Sep 27 '16 at 19:44
• What coordinates? The coordinates for the six points of the hexagon? – Jason B. Sep 27 '16 at 19:46
• i guess I know how to get those points I saw in the Docs, but where can I draw them like you did? – LuaNoob Sep 27 '16 at 19:47
• Start with this: pts = CirclePoints[{1,1},2,6]; Print[pts]; hexagon = Polygon[pts]; Graphics[hexagon] – Jason B. Sep 27 '16 at 19:49
• I cant find the Internet Site you are using with it.. – LuaNoob Sep 27 '16 at 19:52