Gosper Islands II
While the previous example draws the hexagons using SVG transformations (e.g., rotatation and translation), this experiment uses coordinates already translated and rotated. A recursive procedure for calculating the overall rotation, translation and scale of a certain hexagon has been used:
- Since a hexagon rotates by an angle Q = 19.1066° at each iteration (i.e., order) of the Gosper curve, the overall rotation of a hexagon belonging to the i-th order is equal to Q times i.
- The translation of a certain hexagon H is given by all the translations of his ancestors. Given the order of the hexagon, its final translation will be the sum of the coordinates of all its ancestors hexagons.
- Since a hexagon is scaled by √7 at each iteration, the overall scale of a hexagon belonging to the i-th order is equal to √7 times i.
(By refreshing the page a random iteration is loaded.)