An improved algorithm for gray image representation using non-symmetry and anti-packing model with triangles and rectangles