Make things build.
Integrate correctly.

But this freezes the computer..
Fix integral some more.
Fix oscillation frequency.
Sine wave should really be half sine wave.