An effective way to represent quadtrees

  • Authors:
  • Irene Gargantini

  • Affiliations:
  • Univ. of Western Ontario, London, Ont., Canada

  • Venue:
  • Communications of the ACM
  • Year:
  • 1982

Quantified Score

Hi-index 48.30

Visualization

Abstract

A quadtree may be represented without pointers by encoding each black node with a quaternary integer whose digits reflect successive quadrant subdivisions. We refer to the sorted array of black nodes as the “linear quadtree” and show that it introduces a saving of at least 66 percent of the computer storage required by regular quadtrees. Some algorithms using linear quadtrees are presented, namely, (i) encoding a pixel from a 2n × 2n array (or screen) into its quaternary code; (ii) finding adjacent nodes; (iii) determining the color of a node; (iv) superposing two images. It is shown that algorithms (i)-(iii) can be executed in logarithmic time, while superposition can be carried out in linear time with respect to the total number of black nodes. The paper also shows that the dynamic capability of a quadtree can be effectively simulated.