public void map() {
			//points is start, controls, end
			double[][][] V = new double[points.length-1][intervals+1][2];
			for (int c = 0; c < V.length; c++) {
				for (int i = 0; i < V[c].length; i++) {
					V[c][i][0] = (1 - (double)i/intervals)*points[c][0] + ((double)i/intervals)*points[c+1][0];
					V[c][i][1] = (1 - (double)i/intervals)*points[c][1] + ((double)i/intervals)*points[c+1][1];
				}
			}
			while (V.length > 1) {
				double[][][] VV = new double[V.length - 1][intervals+1][2];
				for (int c = 0; c < VV.length; c++) {
					for (int i = 0; i < VV[c].length; i++) {
						VV[c][i][0] = (1 - (double)i/intervals)*V[c][i][0] + ((double)i/intervals)*V[c+1][i][0];
						VV[c][i][1] = (1 - (double)i/intervals)*V[c][i][1] + ((double)i/intervals)*V[c+1][i][1];
					}
				}
				V = VV;
			}
			XY = new int[2][V[0].length];
			for(int i = 0; i < XY[0].length; i++) {
				XY[0][i] = (int) Math.round(V[0][i][0]);
				XY[1][i] = (int) Math.round(V[0][i][1]);
			}
		}