Rectangle Islands (Rectangle Grids)

Auxs

MaxLevel[Island_]:=Max[Flatten[Island]];
ShowConfigc[Is_]:=Module[{g1,rn,cn},{rn,cn}=Dimensions[Is];g1=Table[Cuboid[{j,i,0},{j+1,i+1,Is[[j,i]]}],{i,cn},{j,rn}]];
IList={};IslandsConfigb={{2,3,1,2,2,2},{2,2,1,2,2,2},{4,3,1,2,2,2},{1,1,1,2,2,2}};

Experiments

Manipulate[Column[{Panel["Demo 1   --  Islands and Sea Levels "],Row[{Show[Graphics3D[{Red,ShowConfigc[IslandsConfigb]}],Plot3D[n+.1,{x,-1,Dimensions[IslandsConfigb][[1]]+2},{y,-1,Dimensions[IslandsConfigb][[2]]+2},Mesh->None,Axes->False],Boxed->False,ImageSize->{200,200}],ArrayPlot[IslandsConfigb/.c_?NumberQ:>If[c>n,1,0],ImageSize->{200,200}]}]}],{n,0,MaxLevel[IslandsConfigb],1,Appearance->"Labeled"},Initialization:>(MaxLevel[Island_]:=Max[Flatten[Island]];IList={};),ContinuousAction->True,SaveDefinitions->True]