entById("polynomial");
    var canvas_rect = polynomial.getBoundingClientRect();
    polynomial_draw(0, 0, false);

    polynomial.addEventListener('mousemove', function(e){
        var canvas_rect = polynomial.getBoundingClientRect();
        polynomial_draw(e.clientX - canvas_rect.left, e.clientY - canvas_rect.top, true);
        if(e.buttons == 1) {
            polynomial_xs[polynomial_i] = client_to_x(e.clientX - canvas_rect.left);
            polynomial_ys[polynomial_i] = client_to_y(e.clientY - canvas