private static Point[] removeRedundancy(Point[] points) {
		List<Point> p = new ArrayList<Point>();
		for (Point i : points)
			p.add(i);

		for (int i = 1; i < p.size() - 1;) {
			Triangle t = new Triangle(p.get(i - 1), p.get(i), p.get(i + 1));

			int[] a, b;
			a = Triangle.connVect(t.getA(), t.getB());
			b = Triangle.connVect(t.getA(), t.getC());

			boolean remove;
			if (a[0] == 0 || b[0] == 0 || a[1] == 0 || b[1] == 0)
				remove = a[0] == b[0] && a[1] == b[1];
			else
				remove = (double) b[0] / (double) a[0] == (double) b[1] / (double) a[1];

			if (remove)
				p.remove(i);
			else
				i++;
		}

		return (Point[]) p.toArray(new Point[p.size()]);
	}