I did basically this in my first year of college! See [1].
(Note: code was never intended to be visible to the public, and this is old and bad. But hey, it works!)
(Note: code was never intended to be visible to the public, and this is old and bad. But hey, it works!)