Giuseppe Della Penna :: Website @ UnivAQ

In this framework the graphical objects are characterized by their bounding boxes, i.e., they can be syntactically described and manipulated through their bounding box, whatever the shape of the object is. Indeed, the spatial compositions that relate the graphical objects are defined on the coordinates of the upper-left and lower-right points of their bounding box.

The following definition gives a formal specification for the
generic spatial relation REL with respect to a graphical object *a*.
It uses two functions UL_{REL}(m, n, m_{1}, n_{1}) and LR_{REL}(m, n,
m_{1}, n_{1}) that map the coordinates of the upper-left (m, n) and lower-right (m_{1}, n_{1}) points of the bounding box of
*a* onto sets
of points.

Given a graphical object *a* with coordinates of the upper-left and
lower-right points (x, y) and (x_{1}, y_{1}), respectively, and a
graphical object *b* with coordinates of the upper-left and
lower-right points (h, k) and (h_{1}, k_{1}), respectively, then:
*a*
REL *b* holds if and only if (h, k) is in the set UL_{REL}(x, y, x_{1}, y_{1})
and (h_{1}, k_{1}) is in the set LR_{REL}(x, y, x_{1}, y_{1}).

In other words, *a* REL *b* holds if and only if the upper left and
the lower right points of *b* are contained respectively within two
areas calculated on the syntactic attributes of *a* through the functions UL_{REL} and LR_{REL}.

The above definition of composition yields three types of possible spatial arrangements: inclusion, intersection and spatial concatenation, where the term "concatenation" refers to any spatial arrangement of graphical objects not intersecting their areas.

As an example, the relations **INCLUDE**, **UP**, **DOWN**, **LEFT** and
**RIGHT** are defined as
foloows. These relations model the general types of
*inclusion* and *spatial concatenation*.

**INCLUDE**: UL_{INCLUDE}(x, y, x_{1}, y_{1}) = {(m, n) | x <= m < x_{1}, y_{1}< n <= y}, LR_{INCLUDE}(x, y, x_{1}, y_{1}) ={(m, n) | x < m <= x_{1}, y_{1}<= n < y}**UP**: LR_{UP}(x, y, x_{1}, y_{1}) = {(m, n) | n > y}**DOWN**: UL_{DOWN}(x, y, x_{1}, y_{1}) = {(m, n) | n < y_{1}}**LEFT**: LR_{LEFT}(x, y, x_{1}, y_{1}) = {(m, n) | m < x}**RIGHT**: UL_{RIGHT}(x, y, x_{1}, y_{1}) = {(m, n) | m > x_{1}}