ar approximation_i = 0;
function init_approximation_canvas(){
	var canvas = document.getElementById("approximation_canvas");
	canvas.addEventListener('pointerdown', function(e){
		canvas_rect = canvas.getBoundingClientRect();
		const xy = [e.clientX - canvas_rect.left, e.clientY - canvas_rect.top];
		if(document.getElementById("a_1").checked) { // add
			points_for_approximation.push(xy);
			approximation_i = points_for_approximation.length-1;
		} else { // move
			approximation_i = nearest_i(xy, points_for