1. A method for generating dummy patterns for a region of an integrated circuit that is divided into a plurality of buckets, the method comprising: obtaining a local pattern density for a respective bucket; and adjusting a density of a dummy pattern for the respective bucket as a continuously variable function of the respective local pattern density and a target density for the region.