implemented scheme for automatic square and pentagon decomposition and