A rotating disk composed of alternating light and dark segments may give rise to the wagon wheel illusion: a perceptual reversal in rotation direction. Continuously illuminated (eg in daylight) as well as discretely presented (eg stroboscopic or computer-animated) versions of the illusion exist; here, we investigated the discrete version. Prominence of the illusion is commonly believed to depend on temporal frequency of rotation, but frequency effects have been unsystematic across previous experiments. Here, illusion strength is shown instead to lawfully depend on an attraction function of angular displacement between successive frames (experiments 1 and 2). We studied the illusion across a wider range of this factor than previously and as a result obtained unusually strong effects (up to 100% reversal). In two further experiments we showed that this is because the effect of the attraction function on the wagon wheel illusion strength is modulated by a perceived increase in the number of spokes of the wheel, a phenomenon generally known as the frequency doubling illusion. These factors combine to offer a unifying explanation of the wagon wheel illusion, at least under discrete presentation and possibly under continuous presentation conditions as well.