software/final/alf_car/src/pathfinder/arrayutils.cpp
void fillGrayGradient(map_t &map, int blockSize)
{
    int grayValue = BLACK_VALUE;  // begin with black
    int halfBlock;

    if(blockSize >= 3)
        halfBlock = (blockSize-1) / 2;
    else
        halfBlock = 1;

    for(int iteration = 0; iteration < 800; iteration++, grayValue+=5)    // get brighter
        for( int i = 0; i < map.size_y; i++)
            for(int j = 0; j < map.size_x; j++)
            {
                if(map.array[i][j] == grayValue)
                {
                    setBlockToGrayvalue(map, i, j, grayValue + 5, halfBlock);
                }
            }
}
/* fill map with gray-values decending from black to white (dependent on distance) */
fill map with gray-values decending from black to white (dependent on distance)
fill map with gray - values decending from black to white ( dependent on distance )
void fillGrayGradient(map_t &map, int blockSize)
{
    int grayValue = BLACK_VALUE;  
    int halfBlock;
    if(blockSize >= 3)
        halfBlock = (blockSize-1) / 2;
    else
        halfBlock = 1;
    for(int iteration = 0; iteration < 800; iteration++, grayValue+=5)    
        for( int i = 0; i < map.size_y; i++)
            for(int j = 0; j < map.size_x; j++)
            {
                if(map.array[i][j] == grayValue)
                {
                    setBlockToGrayvalue(map, i, j, grayValue + 5, halfBlock);
                }
            }
}
void fillGrayGradient ( map_t & map , int blockSize ) { int grayValue = BLACK_VALUE ; int halfBlock ; if ( blockSize >= 3 ) halfBlock = ( blockSize - 1 ) / 2 ; else halfBlock = 1 ; for ( int iteration = 0 ; iteration < 800 ; iteration ++ , grayValue += 5 ) for ( int i = 0 ; i < map . size_y ; i ++ ) for ( int j = 0 ; j < map . size_x ; j ++ ) { if ( map . array [ i ] [ j ] == grayValue ) { setBlockToGrayvalue ( map , i , j , grayValue + 5 , halfBlock ) ; } } }
fill map with gray-values decending from black to white (dependent on distance)
fill map with gray - values decending from black to white ( dependent on distance )
// begin with black // get brighter