private void center() {
		float[] min = new float[] {Float.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE};
		float[] max = new float[] {Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE};
		for(Vertex v : vertices) {
			for(int a = 0; a < 3; a++) {
				min[a] = Math.min(min[a], v.data[a]);
				max[a] = Math.max(max[a], v.data[a]);
			}
		}
		float[] avg = new float[3];
		for(int a = 0; a < 3; a++) {
			avg[a] = min[a] + (max[a] - min[a])/2;
		}
		for(Vertex v : vertices) {
			for(int a = 0; a < 3; a++) {
				v.data[a] -= avg[a];
			}
		}
	}