title: Transforming a rectangle into a ring
body: <p>I have a rectangle that I need to 'bend' into a ring, i.e. the top edge of the rectangle must map to the outer circle of the ring, the bottom to the inner circle, and the sides of the rectangle should join.</p>
  
  <p>Here's an extremely crude sketch of the rectangle and ring:
  <img src="https://i.stack.imgur.com/5V4NJ.png" alt="enter image description here"></p>
  
  <p>If it is helpful or necessary, I can deal with the rectangle as a collection of horizontal lines, and the ring as a collection of circles.</p>
  
  <p>The rectangle has a horizontal gradient from a to b that should map so that the gradient progresses on a circular direction.</p>
  
  <p>I can see that this is a non-linear transform, but am lost as to where to look to learn the techniques to solve this problem. Could anyone with suitable experience in CG point me to anything like the right text, the right name of algorithm or the right graphics library to make my ring?</p>