1. A method for placing an assist feature in a layout, comprising: receiving a layout of an integrated circuit; selecting an evaluation point in the layout; choosing a candidate location in the layout for identifying locations of constructive and destructive interference; identifying the locations of constructive and destructive interference by, iteratively: selecting perturbation locations in proximity to the candidate location; determining aerial images by using an image intensity model, the layout, and by placing a representative feature at a representative location, wherein the representative location is the candidate location or one of the perturbation locations; determining image-gradient magnitudes at the evaluation point based on the aerial images; and updating the candidate location using the image-gradient magnitudes; and placing an assist feature in the layout based on the locations of constructive and destructive interference.