private void setPoints(TreeNode node, int depth, int thisDepth,
			int[] width, int[] widthSofar, Map nodeToPoint) {
		// Scale points along ([0,1], [0,1]).
		float x = (float) (widthSofar[thisDepth] + 1)
				/ (float) (width[thisDepth] + 1);
		float y = (float) (thisDepth + 1) / (float) (depth + 2);
		nodeToPoint.put(node, new Point2D.Float(x, y));
		// Check the maximum width.
		// max_width = Math.max(max_width, width[thisDepth]);
		// Update the depth and width figures.
		widthSofar[thisDepth++]++;
		// Recurse on children.
		TreeNode[] children = Trees.children(node);
		for (int i = 0; i < children.length; i++)
			setPoints(children[i], depth, thisDepth, width, widthSofar,
					nodeToPoint);
	}