Implement diamond square generator