Waterwheels in China found practical uses such as this, as well as extraordinary use. The inventor Zhang Heng (78–139) was the first in history to apply motive power in rotating the astronomical instrument of an armillary sphere, by use of a waterwheel. The mechanical engineer Ma Jun (200–265) once used a waterwheel to power and operate a large mechanical puppet theater for Emperor Ming of Wei.