C. Sun and S. Pallottino, Circular Shortest Path in Images, Pattern Recognition, 36(3):709-719, March 2003. http://vision-cdc.csiro.au/changs/doc/sun-pallottino03pr.pdf
your question sounds interesting to me. However, I'm not at all familiar with your problem. I most likely can't help you but just out of curiosity, could you try to explain to me - in easy words preferably - what you intend to accomplish? Or could you add literature where I could inform myself about the topic?