1. A non-transitory computer-readable storage medium encoded with instructions that, when executed, operate to cause a computer to perform operations comprising: defining a shape corresponding to a gesture within motion data; sampling the motion data at points that are aligned with the defined shape; determining, based on the sampled motion data, positions of a moving object along the defined shape, over time, wherein determining the positions occurs subsequent to defining the shape; determining whether the moving object is performing the gesture based on a pattern exhibited by the determined positions; and controlling an application if determining that the moving object is performing the gesture.