function area = pixel_area ( m, n )

  p = load ( 'p9.txt' );
  k = size ( p, 1 );
  pc(1:k) = uint8 ( 1 : k );
  a = zeros ( m, n );
  area = zeros ( k, 1 );

  for i = 1 : m
    y = ( m  - i ) / ( m - 1 );
    for j = 1 : n
      x = ( j - 1 ) / ( n - 1 );
      dmin = Inf;
      closest = 0;
      for kk = 1 : k
        d = norm ( p(kk,1:2) - [ x, y ] );
        if ( d < dmin )
          dmin = d;
          closest = kk;
        end
      end
      area(closest) = area(closest) + 1;
      a(i,j) = pc(closest);
    end
  end

  imagesc ( a );

  area = area / m / n;
  
  return
end
