Data &#x3D; new Uint8ClampedArray(elevationData.length);
  var dp &#x3D; data.resolution * 2;
  var maxX &#x3D; width - 1;
  var maxY &#x3D; height - 1;
  var pixel &#x3D; [0, 0, 0, 0];
  var twoPi &#x3D; 2 * Math.PI;
  var halfPi &#x3D; Math.PI / 2;
  var sunEl &#x3D; Math.PI * data.sunEl / 180;
  var sunAz &#x3D; Math.PI * data.sunAz / 180;
  var cosSunEl &#x3D; Math.cos(sunEl);
  var sinSunEl &#x3D; Math.sin(sunEl);
  var pixelX, pixelY, x0, x1, y0, y1, offset,
      z0, z1, dzdx, dzdy, slope, aspect, co