Digitized Reflections and Rotations with Geometric Algebra

Stéphane Breuils, Yukiko Kenmochi, Akihiro Sugimoto

Why geometric algebra?

Reflections

\( {\color{green}\mathbf{y}} = -{\color{blue}\mathbf{m}} {\color{red}\mathbf{x}} {\color{blue}\mathbf{m}^{-1}} \)

Why geometric algebra?

Reflections to rotations 

\( {\color{green}\mathbf{y}} = \mathbf{Q} {\color{red}\mathbf{x}} \mathbf{Q}^{-1} \)

\( \mathbf{Q} = \color{blue}\mathbf{m}\mathbf{n} \)

Why geometric algebra?

Reflections, rotations (and translations)

\( \mathbf{Q} = \color{blue}\mathbf{m}\mathbf{n} =  \cos{\frac{\theta}{2}} + \sin{\frac{\theta}{2}} \mathbf{e}_{12} \) \( (2D)\)

\( \bullet \) defined for any dimension

\( \bullet \) generic and easy to manipulate

 

Knowing \(\mathbf{m} \) normal vector to the line of reflection, reflection of \( \mathbf{x} \) : 

\( \mathbf{y} = -\mathbf{m} \mathbf{x} \mathbf{m}^{-1} \)

Product \(\mathbf{m} \mathbf{n} \), rotation of \( \mathbf{x} \) : 

Digital Geometry and Geometric Algebra (GA)

New bijective rotations from bijective digitized reflections

Operators

Digitized reflections 

\( \bullet \) Reflections \( \mathcal{U}^{m} \)

\( \bullet \) Digitized operator \( \mathcal{D} \)

\left| \begin{array}{cccc} \mathcal{D} : & \mathbb{R}^d & \rightarrow & \mathbb{Z}^d \\ & \sum_{i=1,\ldots,d} u_i \mathbf{e}_i & \mapsto & \sum_{i=1,\ldots,d} \lfloor u_i + \frac{1}{2} \rfloor \mathbf{e}_i \end{array} \right.
\left| \begin{array}{cccc} \mathcal{R}^{\mathbf{m}} : & \mathbb{Z}^d & \rightarrow & \mathbb{Z}^d \\ & \mathbf{x} & \mapsto & \mathcal{D} \circ \mathcal{U}^{ \mathbf{m} } (\mathbf{x}) \end{array} \right.

\( \bullet \) Digitized reflections \( \mathcal{R}^{\mathbf{m}}\)

\left| \begin{array}{cccc} \mathcal{U}^{ \mathbf{m} } : & \mathbb{R}^d & \rightarrow & \mathbb{R}^d \\ & \mathbf{x} & \mapsto & -\mathbf{m} \mathbf{x} \mathbf{m}^{-1} = -\frac{1}{\Vert \mathbf{m} \Vert^2}\mathbf{m} \mathbf{x} \mathbf{m}. \end{array} \right.

Digitized cell

\( \bullet \) Equivalent to the Voronoi cell definition

\begin{array}{rll} \mathcal{C}_{\mathcal{T}}(\kappa) := \big\{ \mathbf{x} \in \mathbb{R}^d , \forall i\in [ 1,d ] & & || \mathbf{x}- \kappa || \leq || \mathbf{x}- \kappa + \mathcal{T} \mathbf{e}_i \mathcal{T}^{\dagger} || \\ \text{ and } & & || \mathbf{x}- \kappa || < || \mathbf{x}- \kappa - \mathcal{T} \mathbf{e}_i \mathcal{T}^{\dagger} || \big\}. \end{array}

\( \mathcal{C}_{1}(\mathbf{0})\)

\( \mathcal{C}_{1}(\mathbf{t})\)

\( \mathbf{t} = 3 \mathbf{e}_1 + 2 \mathbf{e}_2\)

Digitized cell

\( \bullet \) Equivalent to the Voronoi cell definition

\begin{array}{rll} \mathcal{C}_{\mathcal{T}}(\kappa) := \big\{ \mathbf{x} \in \mathbb{R}^d , \forall i\in [ 1,d ] & & || \mathbf{x}- \kappa || \leq || \mathbf{x}- \kappa + \mathcal{T} \mathbf{e}_i \mathcal{T}^{\dagger} || \\ \text{ and } & & || \mathbf{x}- \kappa || < || \mathbf{x}- \kappa - \mathcal{T} \mathbf{e}_i \mathcal{T}^{\dagger} || \big\}. \end{array}

\(\mathcal{C}_{\frac{\mathbf{m}}{||\mathbf{m} || }} (\mathbf{0}) \)

Digitized cell

\( \bullet \) Definition

\( \bullet \) Includes

      \( \hookrightarrow \) Cell reflection

      \( \hookrightarrow \) Cell translation, rotation

\begin{array}{rll} \mathcal{C}_{\mathcal{T}}(\kappa) := \big\{ \mathbf{x} \in \mathbb{R}^d , \forall i\in [ 1,d ] & & || \mathbf{x}- \kappa || \leq || \mathbf{x}- \kappa + \mathcal{T} \mathbf{e}_i \mathcal{T}^{\dagger} || \\ \text{ and } & & || \mathbf{x}- \kappa || < || \mathbf{x}- \kappa - \mathcal{T} \mathbf{e}_i \mathcal{T}^{\dagger} || \big\}. \end{array}

Bijectivity condition

\left| \begin{array}{cccc} \mathcal{S}^{ \mathbf{m} } : & \mathbb{Z}^2 \times \mathbb{Z}^2 & \rightarrow & \mathbb{R}^2 \\ & (\mathbf{x}, \mathbf{y}) & \mapsto & \mathcal{U}^{ \mathbf{m} }(\mathbf{x}) - \mathbf{y} \end{array} \right.

\( \bullet \) Set of remainder

\( \bullet \) Bijectivity condition

\left\{ \begin{array}{l} \forall \mathbf{y} \in \mathbb{Z}^2, \exists \mathbf{x} \in \mathbb{Z}^2, \mathcal{S}^{\mathbf{m}}(\mathbf{x},\mathbf{y}) \in \mathcal{C}_{1}(\mathbf{0}) \\ \forall \mathbf{x} \in \mathbb{Z}^2, \exists \mathbf{y} \in \mathbb{Z}^2, \mathcal{S}^{\mathbf{m}}(\mathbf{x},\mathbf{y}) \in \mathcal{C}_{\frac{\mathbf{m}}{||\mathbf{m} || }}(\mathbf{0}) \\ \end{array} \right.

\( \mathcal{C}_{\frac{\mathbf{m}}{||\mathbf{m} ||}}(\mathbf{0}) \)

\( \mathcal{C}_{1}(\mathbf{0}) \)

Bijectivity condition 

Examples

Find bijective digitized reflections 

\( \bullet \) Idea: use bijectivity condition of digitized rotations

    (Jacob, Andres, Nouvel, Roussillon, Coeurjolly)

\begin{array}{cl} \{\cos(\theta),\sin(\theta)\} = \Big\{ \frac{2k+1}{2k^2 + 2k+1}, \frac{2k(k+1)}{2k^2 + 2k+1} \Big\}, k\in \mathbb{N} \end{array}

\( \bullet \) Geometric algebra, rotation of angle \(\theta\) of an object \(\mathbf{x}\):

\mathbf{x}'= Q \mathbf{x} Q^{-1}
Q = \cos{\frac{\theta}{2}} + \sin{\frac{\theta}{2}} \mathbf{e}_{12}

Find bijective digitized rotations

\( \bullet \) \(\cos{(\frac{\theta}{2})},\sin{(\frac{\theta}{2})}\)?

\begin{array}{cl} \{\cos(\theta),\sin(\theta)\} = \Big\{ \frac{2k+1}{2k^2 + 2k+1}, \frac{2k(k+1)}{2k^2 + 2k+1} \Big\}, k\in \mathbb{N} \end{array}
\begin{array}{cl} \cos(\frac{\theta}{2} ) &= \sqrt{ \frac{ 1}{2} + \frac{2k+1}{2(2k^2 + 2k+1)} } \\ % &= \sqrt{ \frac{(k+1)^2}{2k^2 + 2k+1} } \\ &= \frac{(k+1)}{\sqrt{2k^2 + 2k+1}} \end{array}, \quad \begin{array}{cl} \sin(\frac{\theta}{2} ) &= \sqrt{ \frac{ 1}{2} - \frac{2k+1}{2(2k^2 + 2k+1)} } \\ % &= \sqrt{ \frac{k^2}{2k^2 + 2k+1} } \\ &= \frac{k}{\sqrt{2k^2 + 2k+1}} \end{array}

\( \bullet \) Rotation operator valid up to a scale, then

\mathbf{Q} = \cos{\frac{\theta}{2}} + \sin{\frac{\theta}{2}} \mathbf{e}_{12} = (k+1) + k \mathbf{e}_{12}, \quad k \in \mathbb{N}.

Back to digitized reflections

Find bijective digitized reflections

\( \bullet \) Idea

     \( m_b \) : digitized bijective reflection 

\(\Leftrightarrow \) \(-\mathbf{e}_1 m_b \mathbf{e}_1^{-1}\) is also a bijective digitized reflection

\(\Leftrightarrow \) \(-\mathbf{e}_1 (a \mathbf{e}_1 + b \mathbf{e}_1) \mathbf{e}_1^{-1}  \) is also a bijective  digitized reflection

 

 

\( \bullet \) Insert in the definition of digitized reflection 

\(\Leftrightarrow \mathbf{e}_1 \mathbf{m}_b \mathbf{e}_1^{-1} \mathbf{x} \mathbf{e}_1 \mathbf{m}_b^{-1} \mathbf{e}_1^{-1} \)

\(\Leftrightarrow (\mathbf{e}_1 \mathbf{m}_b) (\mathbf{e}_1^{-1} \mathbf{x} \mathbf{e}_1) (\mathbf{e}_1 \mathbf{m}_b) ^{-1} \)

reflection of \(  \mathbf{x} \) w.r.t.  \( \mathbf{e}_2\) axis 

Bijective digitized reflections

\(\Leftrightarrow (\mathbf{e}_1 \mathbf{m}_b) (\mathbf{e}_1^{-1} \mathbf{x} \mathbf{e}_1) (\mathbf{e}_1 \mathbf{m}_b) ^{-1} \)

\( \bullet \) \( \mathbf{e}_1 \mathbf{m}_b \)?

\( \mathbf{e}_1 (a \mathbf{e}_1 + b \mathbf{e}_2) = a  + b \mathbf{e}_{12}\)

 

\( \rightarrow \)homogeneous to the operator performing a rotation in geometric algebra 

Bijective digitized reflections

\( \bullet \) \( a,b \) ?

\( \rightarrow \) Use the bijectivity of digitized rotations

\mathbf{Q} = \cos{\frac{\theta}{2}} + \sin{\frac{\theta}{2}} \mathbf{e}_{12} = (k+1) + k\mathbf{e}_{12}, \quad k \in \mathbb{N}.

\( \mathbf{e}_1 (a \mathbf{e}_1 + b \mathbf{e}_2) = a  + b \mathbf{e}_{12}\)

 

\( \rightarrow \)homogeneous to the operator performing a rotation in geometric algebra 

Results

\( \bullet \) \( a,b \) ?

\( a = (k+1) ; b = k\)

 

\( \mathbf{m}_b = (k+1) \mathbf{e}_1 + k \mathbf{e}_2, k\in \mathbb{N} \)

Angular distribution of digitized reflections 

Distribution of bijective digitized reflections 

bijective digitized reflections

bijective digitized rotations

Bijective approximation of rotations from bijective digitized reflections 

Approximations for reflections

Input: any digitized reflection 

Problem: find the "nearest" bijective digitized reflection  

Approximation

Approximations and bijectivity

\widetilde{k}= \displaystyle \argmin_{\widetilde{k} \in \{ \lfloor \frac{y}{x - y} \rfloor , \lceil \frac{y}{x - y} \rceil \}} \bigg\vert \frac{ \widetilde{k}x - (\widetilde{k}+1)y }{(\widetilde{k} +1)x+\widetilde{k} y} \bigg\vert

digitized reflection \( \mathbf{m} \)

bijective approximation \( \widetilde{\mathbf{m}} \)

\displaystyle \argmin_{\mathcal{U}^{\widetilde{\mathbf{m}}} \in \mathbf{B}_{k_{\max}}} \Big\vert \widetilde{\theta} - \theta \Big\vert

Digitized rotations and approximation

Bijective digitized rotations from reflections

  • Composition of a digitized reflection (axis \( \mathbf{e}_{1} \)) and a bijective digitized reflection \(  \rightarrow   \) bijective digitized rotation 

Composition of two bijective digitized reflections \( \rightarrow \) bijective approximation of a digitized rotation

Idea:

\( \hookrightarrow \) Approximate a Euclidean rotation of angle \( \theta\) from 2 bijective reflections 

How to choose the 2 digitized reflections?

Bijective digitized rotations from reflections

How to choose the 2 digitized reflections ?

\( \bullet \) Constraint: angle between the 2 normal vectors is \( \frac{\theta}{2} \)

        where \( \theta\) is the rotation angle 

Bijective digitized rotations from reflections

Method

\( \bullet \) Given \( k_{\max} \) and \(\mathbf{B}_{k_{\max}} \) (bijective reflections)

 

\( \bullet \) loop over all bijective reflections \( \mathbf{m}_{1} \in \mathbf{B}_{k_{\max}} \)

 

\( \bullet \) Look for \( \mathbf{m}_{2} \) such that the relative angle between \(\mathbf{m}_{1} \) and \(\mathbf{m}_{2} \) is half the angle of rotation

 

\( \bullet \) Return the couple \( \mathbf{m}_{1},\mathbf{m}_{2} \) whose relative angle is the closest to \( \frac{\theta}{2} \)

Bijective digitized rotations from reflections

Algorithm

Approximation of bijective digitized rotations

Resulting distribution

bijective digitized reflections

bijective digitized rotations

approximation

With Garamon

\( \hookrightarrow \) No double points

\( \hookrightarrow \) No holes

Contributions and perspectives

New bijective digitized rotations from digitized reflections

\( \hookrightarrow \) more bijective digitized rotations 

\( \hookrightarrow \) simple method

\( \hookrightarrow \) can be extended...

 

Perspectives

\( \hookrightarrow \) comparison with the main methods to perform bijective rotations like

    quasi-shears, FFT, rotations from reflections with digital lines (Andres), ...

 

Thanks for your attention!

 

Questions?