Procedural animated texture generation/Gears

Gear's sprite consisted of two parts: The center rod and the animated gear: