Consider a regular hexagon centered at 0 and vertices labeled around 1, 2, 3, 4, 5, 6. Form a smaller regular hexagon centered at the centroid of 0,1,6. Another centroid 0,2,3. Another centroid 0,4,5. The given points of each centroid are also three of the vertices of each new hexagon. Each new hexagon extends beyond the edge of the original, but there is equal unallocated space within the original, so this transformation works on a hexagonal grid.
For each level of recursion there are two choices of which way to divide hexagons, that is, how to number the vertices. Adjacent hexagons must be consistent so that the overhangs extend into the empty areas of neighbors.
Subdividing is the necessary step for generating 3D fractal terrain or clouds on a hexagonal grid, avoiding "creasing" artifacts that show up on a square grid (e.g., diamond-square algorithm). Three new points need to be generated within each hexagon. First 0 is the average of all 6 vertices. Then A is the average of 0,1,2; B the average of 0,3,4; and C the average of 0,5,6. Perturb the z coordinate of the averages as necessary. 0 probably gets perturbed more than A, B, and C. The above choice in each subdivision probably affects how the fractal will turn out. Choose randomly? Choose consistently to rotate 90 degrees?
A Koch snowflake-like shape emerges if you start with one hexagon and pay attention to the border.
There remains the problem of rendering the resulting fractal clouds on a display with square pixels.
No comments :
Post a Comment