Calculate X and Y Components