an animation code for planar array