<jupyter_start><jupyter_text>Projection in $G_{(\mathbb{R}_2)}$>  $ \begin{array}{}uv + vu  = 2(u\cdot v) \\^{Proj_v(u)}_{u=u_{\parallel_v}+u_{\perp_v}}{\huge\color{red}{g}}^{u\cdot v v^{-1}}_{u\cdot v = u_{\parallel_v}v}\end{array}\left \{\begin {array}{} uv = (u \cdot v) + (u \wedge v)  \\ vu = (u \cdot v) - (u \wedge v) \\u_{\parallel_v}v = u \cdot v\, \because x \parallel y \iff x \wedge y = 0 \\uv + vu  = 2(u_{\parallel_v}v) \\\frac{1}{2}(uv + vu) = u_{\parallel_v}v \\u \cdot v = u_{\parallel_v}v \\u \cdot v v^{-1} = u_{\parallel_v} \quad \because v^{-1} = \frac{v}{||v||^2}\\\frac{u \cdot v}{v \cdot v} v = u_{\parallel_v} \quad \because v^2 = v \cdot v ,\quad v \parallel v\\\end{array}\right.$ >  $ u = u_{\parallel_v} + u_{\perp_v}$>  $ uv = u_{\parallel_v}v + u_{\perp_v}v$>  $ uv = u_{\parallel_v}v - vu_{\perp_v}$>  $ uv = u_{\parallel_v}v - v(u - u_{\parallel_v})$>  $ uv = u_{\parallel_v}v - vu + vu_{\parallel_v}$>  $ uv = u_{\parallel_v}v - vu + u_{\parallel_v}v$>  $ uv + vu = u_{\parallel_v}v + u_{\parallel_v}v$>  $ uv + vu = 2u_{\parallel_v}v$>  $ \frac{1}{2}(uv + vu) = u_{\parallel_v}v$>  $ u \cdot v = u_{\parallel_v}v$ >  $^{P_j(\alpha x + \beta y)}_{P_j(\alpha x) + P_j(\beta y)}{\huge\color{red}{p_{roj}}}^{\alpha P_j(x)+\beta P_j(y)}_{}$  Rejection in $G_{(\mathbb{R}_2)}$>  $\begin{array}{}uv - vu = 2(u \wedge v)\\u \wedge v = \frac{1}{2}(uv - vu)\\u_{\perp_v}v = u_{\perp_v} \wedge v \\^{Rej_v(u)}_{u=u_{\parallel_v}+u_{\perp_v}}{\huge\color{red}{g}}^{u\wedge v v^{-1}}_{u\wedge v = u_{\perp_v}v}\end{array}\left \{\begin {array}{} uv = (u \cdot v) + (u \wedge v)  \\ vu = (u \cdot v) - (u \wedge v) \\u_{\perp_v}v = u \wedge v\, \because u \perp v \iff u \cdot v = 0 \\uv - vu  = 2(u_{\perp_v}v) \\\frac{1}{2}(uv - vu) = u_{\perp_v}v \\u \wedge v = u_{\perp_v}v \\u \wedge v v^{-1} = u_{\perp_v} \quad \because v^{-1} = \frac{v}{||v||^2}\\\frac{u \wedge v}{v \cdot v} v = u_{\perp_v} \quad \because v^2 = v \cdot v ,\quad v \parallel v\\\end{array}\right.$  Reflection in $G_{(\mathbb{R}_2)}$>  $ ^{Ref_v(u)}_{u=u_{\parallel_v} + u_{\perp_v}}{\Large\color{red}{g}}^{vuv^{-1}}_{u'=u_{\parallel_v}-u_{\perp_v}}$>  $ u_{\parallel_v} - u_{\perp_v} = u \cdot v v^{-1} - u \wedge v v^{-1} = (u \cdot v - u \wedge v ) v^{-1} = (v \cdot u + v \wedge u)v^{-1} = vuv^{-1}$>  $ u' = u_{\parallel_v} - u_{\perp_v} \\vu' = vu_{\parallel_v} - vu_{\perp_v} \\vu' = u_{\parallel_v}v + u_{\perp_v}v \\vu' = uv\\v^{-1}vu' = v^{-1}uv\\u' = v^{-1}uv $>  $ ^{Ref_v(u)}_{u=u_{\parallel_v} + u_{\perp_v}}{\Large\color{red}{g}}^{v^{-1}uv}_{u'=u_{\parallel_v}-u_{\perp_v}}$<jupyter_code>import clifford.g2 as g2
u = g2.e1 + 4*g2.e2
v = 3*g2.e1 + g2.e2

#u.inv()*v.inv() == (u*v).inv()
# (uv)^{-1}
v.inv()*u*v == v*u*v.inv()<jupyter_output><empty_output><jupyter_text>Rotation in $G_{\mathbb{R}_2}$>  $^{Rot_v(\theta)}_{I=e_1e_2}{\Large\color{red}{g}}^{ve^{I\theta}}_{e^{-I\theta}v}$ >>  need bivector I>>>  $ \color{red}{Bivector} \left \{ \begin{array}{}e_1e_2 \\ e_1 \wedge e_2 \\ uv = u \cdot v + u \wedge v \\\Large\therefore\, {^{Dref_{\hat{v}\hat{w}}(u)}_{}{\Large\color{red}{g}}^{(w^{-1})(v^{-1})u(v)(w)}_{(wv)^{-1}u(vw)}}\end{array}\right .$<jupyter_code>v*w
# import clifford as cl
import clifford.g3 as g3
import sympy as sm
import numpy as np
v = np.sin(np.pi/2)*np.cos(0)*g3.e1 + np.sin(np.pi/2)*np.sin(0)*g3.e2 + np.cos(np.pi/2)*g3.e3
w = np.sin(2)*np.cos(1)*g3.e1 + np.sin(2)*np.sin(1)*g3.e2 + np.cos(2)*g3.e3
#w = (1/np.sqrt(2))*g3.e1 + (1/np.sqrt(2))*g3.e2
u = g3.e1 + g3.e3
(v*w).inv()*u*(v*w)
w*v*u*v*w
(v*w).mag2()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.29818181818181816, 'fraction_numerical': 0.027412587412587414, 'mean_word_length': 3.5380710659898478, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '645718', 'license': 'MIT', 'n_tokens_mistral': 1728, 'n_tokens_neox': 1680, 'n_words': 317, 'path': 'python/GeometryAG/Projection.ipynb', 'repo_name': 'karng87/nasm_game', 'size': '3575'}