How to parametrize a sine curve