public static Image track(Frontier frontier, Panel panel, int iterations) {
		Image image = (Image) frontier.getImage();
		int i = 0;
		boolean changed = true;
//		long time0 = System.currentTimeMillis();
		while (i < iterations && changed) {
			changed = frontier.change();
			i++;
		}
		panel.setTempImage(drawBorder(frontier, (Image) frontier.getImage()
				.clone()));
		panel.paintImmediately(0, 0, image.getWidth(), image.getWidth());
//		System.out.println("Tardo en calcular el borde " + (System.currentTimeMillis() - time0) + " milisegundos");
		
//		System.out.println("painted");
		
		return image;
	}