The sun and planet gear is a method of converting reciprocating motion to rotary motion and was used in the first rotative beam engines.
It was invented by the Scottish engineer William Murdoch, an employee of Boulton and Watt, but was patented by James Watt in October 1781.  It was invented to bypass the patent on the crank, already held by James Pickard. It played an important part in the development of devices for rotation in the Industrial Revolution.
The sun and planet gear converted the vertical motion of a beam, driven by a steam engine, into circular motion using a 'planet', a cogwheel fixed at the end of the connecting rod (connected to the beam) of the engine. With the motion of the beam, this revolved around, and turned, the 'sun', a second rotating cog fixed to the drive shaft, thus generating rotary motion. An interesting feature of this arrangement, when compared to that of a simple crank, is that when both sun and planet have the same number of teeth, the drive shaft completes two revolutions for each double stroke of the beam instead of one. The planet gear is fixed to the connecting rod and thus does not rotate around its own axis.
Note that the axles of the two gears are usually tied to each other by a freely rotating link (not shown in the animation) that keeps the two gears engaged but does not contribute to the drive torque. This link appears, at first sight, to be similar to a crank but the drive is not transmitted through it. Thus, it did not contravene the crank patent.