smooth motion using sin function