private void setMinMaxScale() {
		for (int k = 0; k < DIMENSIONS; k++) {
			max[k] = (double) Double.MIN_VALUE;
			min[k] = (double) Double.MAX_VALUE;
		}
		for (int i = 0; i < numberOfTerms; i++) {   //only 2 or 3 DIMENSIONS
			Term term = terms.get(identifiers[i]);
			coords = term.getPosition();
			for (int k = 0; k < 2; k++) {
				switch (DIMENSIONS) {
					case 2:                         //2 DIMENSIONS
						if (coords[k] > max[k]) {
							max[k] = coords[k];
						}
						if (coords[k] < min[k]) {
							min[k] = coords[k];
						}
						break;
					case 3:                         //3 DIMENSIONS
						if ((coords[k] + coords[2] * Math.sqrt(2)) > max[k]) {
							max[k] = coords[k];
						}
						if ((coords[k] + coords[2] * Math.sqrt(2)) < min[k]) {
							min[k] = coords[k];
						}
						break;
				}
			}
		}
		setScale();
	}