         var di = Math.pow(polynomial_xs[i] - client_to_x(client_x), 2) + Math.pow(polynomial_ys[i] - client_to_y(client_y), 2);
            if(di < min_d){
                min_d = di;
                min_i = i;
            }
        }
        polynomial_i = min_i;
        polynomial_context.setLineDash([4, 4]);
        polynomial_context.beginPath();
        polynomial_context.moveTo(x_to_client(polynomial_xs[min_i]), y_to_client(polynomial_ys[min_i]));
        polynomial_context.lineTo(client_x, client_y)