Prefix sums represent a technique for precomputing partial sums to enable efficient range-sum queries. The concept is encountered under various names across disciplines: for example, summed-area tables in computer graphics, integral images in computer vision, and cumulative distribution functions in probability theory. This paper extends the use of prefix sums to triangular areas, proposing three algorithms tailored for isosceles right triangles with legs parallel to the coordinate axes. The first algorithm uses a straightforward summation of triangle rows, the second employs a recursive subdivision algorithm, while the third leverages elementary geometry principles.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Processing Range-Sum Queries Within Triangular Shapes

  • Mirel Cosulschi,
  • Mihai Gabroveanu,
  • Florin Slabu

摘要

Prefix sums represent a technique for precomputing partial sums to enable efficient range-sum queries. The concept is encountered under various names across disciplines: for example, summed-area tables in computer graphics, integral images in computer vision, and cumulative distribution functions in probability theory. This paper extends the use of prefix sums to triangular areas, proposing three algorithms tailored for isosceles right triangles with legs parallel to the coordinate axes. The first algorithm uses a straightforward summation of triangle rows, the second employs a recursive subdivision algorithm, while the third leverages elementary geometry principles.