public static void zoom(Model3D m, double d, int w, int h) {
		if (h < 6 || w < 6)
			return;
		m.setDecalageX(w / 2);
		m.setDecalageY(h / 2);
		double smlX = w, hgX = 0, smlY = h, hgY = 0;
		for (int i = 0; i < m.getPoints().size(); i++) {
			if (m.getPoints().get(i).x < smlX) {
				smlX = m.getPoints().get(i).x;
			} else if (m.getPoints().get(i).x > hgX) {
				hgX = m.getPoints().get(i).x;
			} else if (m.getPoints().get(i).y < smlY) {
				smlY = m.getPoints().get(i).y;
			} else if (m.getPoints().get(i).y > hgY) {
				hgY = m.getPoints().get(i).y;
			}
		}
		double sizeX, sizeY;
		sizeX = hgX - smlX;
		sizeY = hgY - smlY;
		if (sizeX > sizeY) {
			m.zoom((w / sizeX) * d);
		} else {
			m.zoom((h / sizeY) * d);
		}
	}