I have this function that I use to calculate the index from u,v points based on its respective uStep and vStep values
function getIndex1( u,v, uStep, vStep ) {
    var res = [];
    for( var i = 0; i < 45; i++ ) {
        res[i] = Math.round( v ) * 128 + Math.round( u ); 
        v += vStep;
        u += uStep;
    }
    return res;
}
If I try to interpolate this function, I get this
function getIndex2( u,v, uStep, vStep ) {
    var res = [];
    v *= 128;
    vStep *= 128;
    for( var i = 0; i < 45; i++ ) {
        res[i] = Math.round( v + u );
        v += vStep;
        u += uStep;
    }
    return res;
}
This works great when u,v,uStep,vStep are integers, the problem arise when these values are floats. I have the hunch that I need some "bresenham code" to accomplish my goal. Hope that some can help me.
 
    