Thanks for your comments
@TigerMike : yes, you are right, the pentagon are auto created when you create the hexagons of the right size at the right angle.
If we copy rotate 4 times the hexagon exactly by 138.19°, we create a perfect pentagon, as in the video.
Explanation is a bit long and you need to read the rest of this post only if you really want to know how the 138.19° jumped out in the discussion.
The figure below represents a first hexagon (blue one, number 1) in the (Ox, Oz) plane, with one vertex located at the origin (coordinates (0,0,0)) and one edge being vertical. A is a second vertex of the hexagon. To ease calculation, let’s say OA = 1. (length of [OA] segment is unity).
The angle between 2 edges of an hexagon is 120°.
You can draw the hexagon as the sum of a rectangle and two triangles, sum of angles of a triangle = 180°, sum of the angles of a rectangle = 360°, so sum of angles of a hexagon is 2 * 180 + 360 = 720°, divided by 6 edges => 720 / 6 = 120.
Because of the 120° for an hexagon and the way we placed the hexagon on the plane, the angle between (OA) and (Ox) is 30°. So we can compute the coordinates of A:
Now, we copy rotate the blue hexagon around the (Oz) axis by an angle of value = alpha, which is the “magic” angle that we need to determine. It creates the green (number 2) hexagon, and the A points creates the B points.
We can now compute the coordinates of B:
And replacing Xa, Ya, Za by their values gives:
But the 3 points 0, A, B are also part of the adjacent pentagon, so the angle (AOB) must be 108°.
The angle between to edges of a pentagon is 108°, because you can draw the pentagon as the sum of 3 triangles, so total angle is 3 * 180, to be divided by 5 edges, so 3 * 180 / 5 = 108.
So we have two vectors, OA and OB, we know their coordinates and we know the angle we need to impose between them. So, we can now use vectorial product, which relates the coordinates and the cosinus of the angle between the two vectors:
and as we chose OA = 1, we also have OB = 1 because B is the image of A by a rotation, and rotation is an isometry, so it doesn’t change the length. So the denominator is equal to 1.
Vectorial product is simply the sum Xa * Xb + Ya * Yb + Za * Zb
So the equation becomes:
cos(30°) * cos(30°) * cos(alpha) + 0 * cos(30°) * sin(alpha) + sin(30°) * sin(30°) = cos(108°)
which simplifies in:
and finally, we use the reciprocal of cosinus to get the angle:
… and the result is alpha = 138.19°.
So, if we rotate the first hexagon by exactly 138.19° around the Z axis, as in the video, it will start creating exactly the corresponding edge of the associated pentagon.
The complementary angle is 180° - 138.19° = 41.81° and half of this angle is 20.905°, which I will use to create the soccer.