public void recenter() {
		double xMin = 0;
		double xMax = 0;
		double yMin = 0;
		double yMax = 0;
		boolean first = true;
		for (int i = 0; i < vertexList.size(); i++ ) {
			GPoint vertex = (GPoint) vertexList.get(i);
			if (first) {
				xMin = vertex.getX();
				xMax = vertex.getX();
				yMin = vertex.getY();
				yMax = vertex.getY();
				first = false;
			} else {
				xMin = Math.min(xMin, vertex.getX());
				xMax = Math.max(xMax, vertex.getX());
				yMin = Math.min(yMin, vertex.getY());
				yMax = Math.max(yMax, vertex.getX());
			}
		}
		double xc = (xMin + xMax) / 2;
		double yc = (yMin + yMax) / 2;
		for (int i = 0; i < vertexList.size(); i++ ) {
			GPoint vertex = (GPoint) vertexList.get(i);
			vertex.translate(-xc, -yc);
		}
		cacheValid = false;
	}