Build a hexagon-shaped honeycomb flake
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | radius |
pure function hex_flake(radius) result(hexagons) !! Build a hexagon-shaped honeycomb flake integer,intent(in) :: radius type(hex),allocatable :: hexagons(:) integer :: i,j do i = -radius,+radius do j = max(-radius,-i-radius),min(radius,-i+radius) call hex_insert(hexagons,hex(i,j)) enddo enddo end function hex_flake