Definition:Crossing (Jordan Curve)/Parity

From ProofWiki
Jump to navigation Jump to search

Definition

Let $P$ be a polygon embedded in $\R^2$.

Let $q \in \R^2 \setminus \partial P$, and let $\mathbf v \in R^2 \setminus \left\{ {\mathbf 0}\right\}$ be a non-zero vector.

Let $\mathcal L = \left\{ {q + s \mathbf v: s \in \R_{\ge 0} }\right\}$ be a ray with start point $q$.


Let $N \left({q}\right)$ be the number of crossings between the ray $\mathcal L$ and the boundary $\partial P$ of the polygon $P$.

Then the parity of $q$ is defined as:

$\operatorname{par} \left({q}\right) := N \left({q}\right) \bmod 2$.

It follows from the Jordan Polygon Parity Lemma that $\operatorname{par} \left({q}\right)$ is independent of the choice of $v$.


Sources

Jeff Ericsson: Computational Topology