# 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?

• Polygon[CirclePoints[6]] Commented Sep 27, 2016 at 19:08
• Thank you for answering but how to get those 6 points is the question Commented Sep 27, 2016 at 19:16
• did you read the docs for CirclePoints ? Commented Sep 27, 2016 at 19:20
• Sorry im quite new to this, where can i find those docs? Commented Sep 27, 2016 at 19:23
• type CirclePoints and press "F1". The docs are also online: reference.wolfram.com/language/ref/CirclePoints.html Commented Sep 27, 2016 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 Commented Sep 27, 2016 at 19:44
• What coordinates? The coordinates for the six points of the hexagon? Commented Sep 27, 2016 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? Commented Sep 27, 2016 at 19:47
• Start with this: pts = CirclePoints[{1,1},2,6]; Print[pts]; hexagon = Polygon[pts]; Graphics[hexagon] Commented Sep 27, 2016 at 19:49
• I cant find the Internet Site you are using with it.. Commented Sep 27, 2016 at 19:52