A unified solving approach for two and three dimensional coverage problems in sensor networks