 == "interpolation_canvas") {
		points = points_for_interpolation;
	} else if(canvas_name == "both_canvas") {
		points = points_for_both;
	}

	context.lineWidth = 2;

	// draw approximation
	if(canvas_name == "approximation_canvas") {
		if(points.length > 0 && app_degree >= 0) {
			var polynomial = approximation_of(points, app_degree + 1);

			context.beginPath();
			for(var j = 0; j < w; ++j){
				x = j;
				y = polynomial(x);
				if(j == 0)
					context.moveTo(x, y);
				else
					context.lineTo(x, y);
		