let periodic () =
let height = 2*(height/2) in
let init x y =
(if y mod 2 = 0
then [|x+1,y; x,y+1; x-1,y+1; x-1,y; x-1,y-1; x,y-1|]
else [|x+1,y; x+1,y+1; x,y+1; x-1,y; x,y-1; x+1,y-1|])
|> Array.map (fun (i,j) -> Femtolib.Array_simulate_2d.to_1d width height
((i+width) mod width) ((j+height) mod height)) in
Femtolib.Array_simulate_2d.init width height init