Updated Sine Curve Code

(and hopefully the final one :) )