Added TPF and Bernstein Polynomials

Moved Bernstein Polynomial code into its own function outside of drawing
a Bernstein polynomial so it was more readable and accurate to the
mathematical definition. Also added Truncated power function for spline
interpolation.