I wanted C# code to do this recently, taking a globe bitmap and spherically projecting it and rotating it. I used it as a test for GPT. I asked it for the code. I pasted it into my app and it worked perfectly first time.