shev.addEventListener('mousedown', function(e){
        var canvas_rect = chebyshev.getBoundingClientRect();
        chebyshev_ys[chebyshev_i] = chebyshev_client_to_y(e.clientY - canvas_rect.top);
        chebyshev_draw(e.clientX - canvas_rect.left, e.clientY - canvas_rect.top, false);
    }, false);

    chebyshev.addEventListener('mouseleave', function(e){
        chebyshev_draw(0, 0, false);
    }, false);
}

function chebyshev_draw(client_x, client_y, do_guides){
    chebyshev = document.getElementById(