docs: def to_polar(image):
      """Transform image coordinates to polar.
  
      The image is transformed so that it is wrapped around a point in the
      centre. Vertical straight lines become circles or segments of circles,
      horizontal straight lines become radial spokes.
      """
      # xy image, origin in the centre, scaled to fit image to a circle
      xy = pyvips.Image.xyz(image.width, image.height)
      xy -= [image.width / 2.0, image.height / 2.0]
      scale = min(image.width, image.height) / float(image.width)
      xy *= 2.0 / scale
  
      index = xy.polar()
  
      # scale vertical axis to 360 degrees
      index *= [1, image.height / 360.0]
  
      return image.mapim(index)