How do I use the Hexagon
function of the Polytopes package
?
I am not understanding what is shown in the documentation. I do not see any parameters.
Different from Circle
function where I enter the center value, radius value, ...
EDIT
Actually, my goal is to apply a Boolean operation so that I get this geometry.
The procedure I have in mind is to create a 3D hexagon and a sphere with a certain thickness. With this I could apply some command that get a geometry that represents the intersection of these elements.
In the image the ball is cut in half for just visualization. In fact the sphere is whole to make the intersection.
My attempts:
ℛ =
RegionDifference[Ball[{0, 0, 0}, 10], Ball[{0, 0, 0}, 9]];
DiscretizeRegion[ℛ]
I have identified the points for my Hexagon
transform = CoordinateTransformData["Polar" -> "Cartesian", "Mapping"];
{p1, p2, p3, p4, p5, p6} =
transform[{2 Sqrt[3], # Degree}] & /@ Most[Subdivide[360, 6] + 30] //
N
Graphics[{Black, Line[{p1, p2, p3, p4, p5, p6, p1}], Dashed, Red,
Circle[{0, 0}, 3]}]
Here I tried to define all the vertices:
p0h = {{3., 1.7320508075688772, 0}, {0., 3.4641016151377544,
0}, {-3., 1.7320508075688772, 0}, {-3., -1.7320508075688772,
0}, {0., -3.4641016151377544, 0},
{3., -1.7320508075688772, 0}};
p15h = {{3., 1.7320508075688772, 15}, {0., 3.4641016151377544,
15}, {-3., 1.7320508075688772, 15}, {-3., -1.7320508075688772,
15}, {0., -3.4641016151377544, 15},
{3., -1.7320508075688772, 15}};
But it does not work:
hex = Hexahedron[Join[p0h, p15h]];
Graphics3D[{Pink, hex}]