, 1, 1, 0, 1, 1, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
];

function reset_pixels() {
    pixels = [];
    for(var i = 0; i < ih; ++i) {
        pixelsi = []
        for(var j = 0; j <iw; ++j)
            pixelsi.push(0);
        pixels.push(pixelsi);
    }
}

// solver
function sign_0_positive(x){ // Math.sign like with no 0 option
    if(x >= 0)
        return 1.0;
    return -1.0;
}

function underflow_padded(x){
    if(Math.abs(x) < 1.e-5) 