title: Converting Cartesian image to polar, appearance differences
body: <p>I'm trying to do a polar transform on the first image below and end up with the second. However my result is the third image. I have a feeling it has to do with what location I choose as my "origin" but am unsure.</p>
  
  <p><img src="https://i.stack.imgur.com/1PMl6.png" alt="Target Image"></p>
  
  <p><img src="https://i.stack.imgur.com/AqCLZ.png" alt="Goal"></p>
  
  <p><img src="https://i.stack.imgur.com/ik4yw.jpg" alt="My Transform"></p>
  
  <pre><code>  radius = sqrt(width**2 + height**2)
    nheight = int(ceil(radius)/2)
    nwidth = int(ceil(radius/2))
   for y in range(0, height):
     for x in range(0, width):
       t =  int(atan(y/x))
       r = int(sqrt(x**2+y**2)/2)
       color = getColor(getPixel(pic, x, y))
       setColor( getPixel(radial,r,t), color)
  </code></pre>