Techinical

There are two main technical concerns in implementing the functions defined previously.

  • An unbounded region is not directly representable.

  • Rounding errors need to be handled and/or avoided.

Unbounded region

Given polygon \(L\), let \(B\) be its bounding rectangle, defined by its two opposite points \((x_{0}, y_{0})\) and \((x_{1}, y_{1})\) where \(x_{0} < x_{1}\) and \(y_{0} < y_{1}\).

Additionally, given \(e\), in turn, we define \(\hat{B}\) as a rectangle defined by points \((x_{0} - 4 \rho_{e}, y_{0} - 4 \rho_{e})\) and \((x_{1} + 4 \rho_{e}, y_{1} + 4 \rho_{e})\).

If we change the definition of \(\mathcal{Q}(\mathcal{T})\) as

\[\begin{split}\begin{align} \mathcal{Q}(\mathcal{T}) := &~ \hat{B} \backslash (N_{\rho_{r}}(\tilde{F}) \cup N_{\rho_{r}}(\tilde{M})) \\ = &~ \{Q_{1}, \cdots, Q_{\sigma(\mathcal{Q})}\}, \end{align}\end{split}\]

Then we can define \(\hat{Q}\) of \(\mathcal{T}\) as the one that includes the point \(u := (x_{0} - 2 \rho_{e}, y_{0} - 2 \rho_{e})\).

Note

The use of constants \(2\) and \(4\) is to simplify expressions while avoiding possible rounding errors and/or edge cases.

Rounding errors

As for set relations between regions \(A, B \subseteq \mathbb{R}^{2}\), it would be preferrable to have \(A \subseteq B^{\circ}\) instead of \(A \subseteq B\) whenever possible.

Hence, in determining \(R_{k}\)’s, we actually want as a condition

\[R_{k} \subseteq Q^{\circ}.\]

To avoid rounding errors, we further tweak the definitions as the following.

\[\begin{split}\begin{align} \mathcal{R}(\mathcal{T}) := &~ L \backslash (N_{\rho_{r} - \varepsilon}(\partial{L}) \cup N_{\rho_{r} - \varepsilon}(\tilde{M})) \\ = &~ \{R_{1}, \cdots, R_{\sigma(\mathcal{R})}\} \\ \mathcal{Q}(\mathcal{T}) := &~ \hat{B} \backslash (N_{\rho_{r} - 2 \varepsilon}(\tilde{F}) \cup N_{\rho_{r} - 2 \varepsilon}(\tilde{M})) \\ = &~ \{Q_{1}, \cdots, Q_{\sigma(\mathcal{Q})}\} \end{align}\end{split}\]

where \(\varepsilon\) is some fixed threshold.

Although not strictly necessary, for each \(i\) and \(j\), we also alter the definitions of \(R_{i}^{*}\)’s and \(Q_{j}^{*}\)’s to

\[\begin{split}\begin{align} R_{i}^{*} := &~ N_{\rho_{r} - 3 \varepsilon}(R_{i}) \\ Q_{j}^{*} := &~ N_{\rho_{r} - 3 \varepsilon}(Q_{j}). \end{align}\end{split}\]