Texture mapping on warped mesh

Hi,
I want to map a rectangular texture to a warped mesh.
Imagine the warped mesh as part of the surface of a sphere and the the texture as a “rubber sheet” (rectangular).
Now I want to stretch this sheet to make it fit on the spherical surface.

This is all about the distortion of the texture. By mapping the texture to the warped mesh I want to achieve a fisheye-effect.

I´ve read other posts about image warping, but none of them really deals with the problem of how to create this warped mesh. I´ve also gone through tutorials about texture mapping, but they only tell you things like mapping bitmaps to the sides of a cube. :wink:

I hope you can help me out.
Example code would be very useful.

Thanks in advance
…philipp

P.S. This is where I got the whole idea with the warped mesh from, so this has to be possible in some way:
Image Warping and Dewarping

Please do not crosspost.

I wouldn´t have to, if someone would help me with my questions.