Helpers to plot Sin in JS