2D basic model coding