One way to generate sine and cosine is to track the motion of a rotating vector.

Animated with D3.js.

Created by Willy McAllister.