I'm trying to map data using Processing and then distort it so that appears correctly when wrapped to a 3D globe in Cinema4D. For example, here's some mapped data in 2D and 3D. Notice the distortion in the second image as it gets towards the poles, circles turn to ovals:
I have an equation that should correct for this distortion (more or less) that I have tried to use to distort the original 2D bitmap at top. My code takes each line of pixels, starting at the top and continuing line by line, and widens them accordingly. Here's the code followed by the outcome:
I think the problem here is that the forms as well as the spaces between them are being widened...creating the hourglass effect.
I think it would not be difficult to supplement the code that created the original 2D image with the code that distorts forms, solving the problem (although I'm not sure how to distort the text yet).
However, I have a collection of other bitmaps (not created in Processing) that map data that I would also like to distort and wrap to a 3D globe. So, does anyone have any other ideas for how I might distort this bitmap to wrap correctly?