# Unwinding an image on a spiral to make it long and flat

Here's an odd intellectual puzzle. Something I was daydreaming about on a train - but the maths are somewhat beyond me. How would someone go about un-winding a spiral to produce a long flat image? Like a rope on a spool, I'd want to uncoil the rope so that it lay long and flat. The function would have to take in the image data (imageData) and the imageHeight (the height of the output strip - and hence also the thickness of the 'rope' on the spool). Assumptions that could be made are that the input image is square, containing a circle whose top and bottom touch the top and bottom of the square - and left and right similarly. The hub of circle would be in the absolute centre of the image.

(char*) unwindImage (char* imageData, int imageHeight)


Has anyone else puzzled over this? And, if so, what solution did your come up with?

• Hi headbanger, image warping transformations are certainly possible but it's a bit unclear from your question what you're looking for. An example before/after screenshot or diagram would help. – Nathan Reed May 10 '16 at 17:08
• I think the question is pretty clear in intention. Just dont expect people to publish code for you as the question sounds more like do my work for me the way its presented. – joojaa May 12 '16 at 8:38