on polynomial_draw(client_x, client_y, do_guides){
    polynomial = document.getElementById("polynomial");
    var polynomial_context = polynomial.getContext("2d");
    polynomial_context.font = "16px sans-serif";
    // background
    polynomial_context.fillStyle="#eeeeee";
    polynomial_context.fillRect(0, 0, w, h);

    // grid
    draw_grid_on(polynomial_context);

    // polynomial
    var A = [];
    var B = [];
    for(var i = 0; i < polynomial_n; ++i){
        A[i] = [];
        for(var j = 0; j < 