Refactored sinusoidal motion