ckrbd.js
//seed image with truthy dot locations. Overwrites multiple dots at same location.
seed image with truthy dot locations. Overwrites multiple dots at same location.
seed image with truthy dot locations . Overwrites multiple dots at same location .
function seedImage(givenDots){
    dots = [ {i:0,j:0}]; 
    for (let k=1;k<givenDots.length;k++){
        image[Math.floor(givenDots[k].i)][Math.floor(givenDots[k].j)] = k;
        dots.push({i:givenDots[k].i+0.5, j:givenDots[k].j+0.5}); 
    } 
}
function seedImage ( givenDots ) { dots = [ { i : 0 , j : 0 } ] ; for ( let k = 1 ; k < givenDots . length ; k ++ ) { image [ Math . floor ( givenDots [ k ] . i ) ] [ Math . floor ( givenDots [ k ] . j ) ] = k ; dots . push ( { i : givenDots [ k ] . i + 0.5 , j : givenDots [ k ] . j + 0.5 } ) ; } }
seed image with truthy dot locations.
seed image with truthy dot locations .
//first one will be ignored //note: if multiple dots land in the same cell this retains only the last one. //Arguably one should retain the one closest to the midpoint of the cell. //save dots in pyr coordinate framework