I understand that it may take trigonometry to translate from absolute to relative coordinates, but your example isn’t quite right.
You’re not accounting for relative axis positions if you’re only using 2 variables, that only allows for relative axes that are restricted to a specific plane.