How to calculate dispersion measure for a set of rectangles?

13 Views Asked by At

I want to calculate the dispersion measure of a set of rectangle(30) in such a way that the rotation is considered in the calculation. All the rectangles have same dimension. A rectangle $r_i$ is represented as $\{x,y,\theta\}$, where $x,y \in \mathbb{R}^{2}$ are the center of the rectangle, and $\theta \in (0,\pi )$.

I calculated the dispersion measure $d$ as:

$d = \frac{1}{n} \sum_{i=1}^{n} || r_{ci} - c ||$, $ c = $ midpoint of all the rectangles, $r_{ci}$ is center of the $i^{th}$ rectangle.

Likewise, I calculated the dispersion measure for the four corners of the rectangle $d_{c1}, d_{c2}, d_{c3}, d_{c4}$.

Not sure if summing up $d+d_{c1}+d_{c2}+d_{c3}+d_{c4}$ is the right way to do it.

Is there a better approach that captures how the rectangles as a whole are distributed, while considering rotation into account?