Build a triangle-shaped honeycomb flake
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | size |
pure function hex_triangle(size) result(hexagons) !! Build a triangle-shaped honeycomb flake integer,intent(in) :: size type(hex),allocatable :: hexagons(:) integer :: i,j call assert(size>1,"triangle size > 1",size) do i = 0,size do j = 0,size-i call hex_insert(hexagons,hex(i,j)) enddo enddo end function hex_triangle