How to convert between two coordinate systems?

Have you already studied the following topic?

There are also some code snippets that might help.