Babinet principle applied to the design of metasurfaces and metamaterials