1. A method, comprising: processing an input signal using a segmentation scheme to determine a path of a contact, wherein the input signal indicates a location of the contact at a touch sensor; determining a first direction vector between a first location of the contact and a second location of the contact; selecting from a first plurality of segments a first segment associated with the first direction vector in response to determining that the direction of the first direction vector is within a range of directions associated with the first segment, wherein an area surrounding the first location is divided into the first plurality of segments, and wherein each of the first plurality of segments represents a range of directions around the first location of the contact; determining a second direction vector between a second location of the contact and a third location of the contact; selecting, from a second plurality of segments, a second segment associated with the second direction vector in response to determining that the direction of the second direction vector is within a range of directions associated with the second segment, wherein an area surrounding the second location is divided into the second plurality of segments, and wherein each of the second plurality of segments represents a range of directions around the second location of the contact; and identifying a gesture based on the path of the contact, wherein the path of the contact is represented by at least the first segment and the second segment.