You are on page 1of 1

Chapter 2 — Question 9

Compute the area covered by green in the field of Figure 2.6, first by looking at the field,
then by analysing the quadtree. What formula did you use?

Answer
Observe this is an 8 × 8 raster, so we should count the 1 × 1 units. A little coun-
ting effort on the left hand figure will determine that there are 32 green units.

NW NE SE SW

A system that has the 8 × 8 raster stored as a quadtree, illustrated on the


right, will perform its counting as follows.
It will start from the root (top) node of the tree, and methodically traverse
all paths through the tree. When it encounters a green node at depth 1 in the
tree, it knows this represents a 4 × 4 quadrant. Likewise, green nodes at depth 2
represent 2 × 2 quadrants, and green nodes at depth 3 represent 1 × 1 quadrants.
Therefore, for the given quadtree, the formula it will eventually use is:

1 × 16 + 2 × 4 + 8 × 1 = 32.

go back previous next zoom print

You might also like