<jupyter_start><jupyter_text>CGA<jupyter_code>B = vsr.Dll(tan(pi/12),0,0,0,0,1)
# B = (vsr.Vec(0,0,1).trs() * (vsr.Biv(1,0,0).unit() * (pi/6.0)).exp()).log()
# print(B)
def Cayley(B):
    Rp = vsr.Mot(1.0, B[0], B[1], B[2], B[3], B[4], B[5], 0.0)
    Rn = vsr.Mot(1.0, -B[0], -B[1], -B[2], -B[3], -B[4], -B[5], 0.0)
    return Rp * Rn.inv()
def CayleyLi(B):
    BB = B * B
    Rp = vsr.Mot(1.0, B[0], B[1], B[2], B[3], B[4], B[5], 0.0)
    R0 = vsr.Mot(1.0 - BB[0], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
    R4 = vsr.Mot(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, BB[7])
    Rn = R0 + R4
    Rden = R0 * R0 
    return Rp * Rp * Rn * Rden.inv()
def CayleySelig(B):
    Rp = vsr.Mot(1.0, B[0], B[1], B[2], 0.0, 0.0, 0.0, 0.0)
    Rn = vsr.Mot(1.0, -B[0], -B[1], -B[2], 0.0, 0.0, 0.0, 0.0)
    Rninv = Rn.inv()
    eps = vsr.Mot(0,0,0,0,0,0,0,-1)
    b = vsr.Mot(0.0, B[5], -B[4], B[3], 0.0, 0.0, 0.0, 0.0)
    return Rp * Rninv + eps * Rninv * b * Rninv * 2
R1 = Cayley(B)
print(R1)
print(R1 * R1.rev())
Rs = CayleySelig(B)
print(np.array(Rs))
one = vsr.Mot(1,0,0,0,0,0,0,0)
np.array((Rs - one)*(Rs + one).inv())
np.array(B)
R2 = CayleyLi(B)
print(R2)
d = vsr.Rot(1,B[0],B[1],B[2]) 
dn = 1.0  / sqrt((d * d.rev())[0])
O = (vsr.Mot(1.0, B[0], B[1], B[2], B[3], B[4], B[5], 0.0) + (B^B * 0.5)) * dn
print(O)
print(O * O.rev())
vsr.Dll(1,2,3,4,5,6).drv().vec().unduale()
B1 = B.biv()
B2 = vsr.Vec(B[3],B[4],B[5]).unduale()
B1 <= B2 + B2 <= B1
w = B.biv().norm()
B2 = (B * B)[0]
B4 = B2 * B2


vsr.Vec(1,2,3).trs() * vsr.Biv(pi/6,0,0).exp()
a = vsr.Mot(0,1,2,3,0,0,0,0) * 0.5
I = vsr.Mot(0,0,0,0,0,0,0,1)
Rp = vsr.Rot(1.0,B.biv()[0], B.biv()[1], B.biv()[2])
Rn = vsr.Rot(1.0,-B.biv()[0], -B.biv()[1], -B.biv()[2])
Rp * Rn.inv()
Rs.rot()
R1 = vsr.Biv(pi/6,0,0).exp()
R2 = vsr.Biv(0,pi/5,0).exp()
R = R2 * R1.rev()
print(R)
pi/2 - pi/6 
pi/3
th = R.log().norm()
d_geod = (R2 * R1.rev()).log().norm()
d_geod
np.arccos((R2 * R1.rev())[0])
np.sqrt(np.linalg.norm(np.array(R2)-np.array(R1)))
2 * sin(th / 4)
np.linalg.norm(np.array(R2)+np.array(R1))
np.sqrt(np.inner(R2,R1))
cos(pi/4)
np.linalg.norm(vsr.EGA(R) - vsr.EGA(vsr.Rot(1,0,0,0)))
cos(th) - 1
np.sqrt(np.sum([(vsr.EGA(R) - vsr.EGA(vsr.Rot(1,0,0,0)))[i]**2 for i in range(8)]))
np.linalg.norm(vsr.EGA(R2) - vsr.EGA(R1))
2 * sin(th/2)
ct = np.cos(th/2)
st = np.sin(th/2)
(ct**2 - 2*ct + 1 + st**2) * 4
sqrt((ct - 1)**2) + np.linalg.norm(R.biv())
np.inner(R.biv(),R.biv())
sqrt((1 - R[0])**2 + R[1]**2 + R[2]**2 + R[3]**2)
(1 - R[0])**2 + R[1]**2 + R[2]**2 + R[3]**2
(1 - R[0])**2
(cos(th) - 1)**2 + sin(th)**2
1 - 2 * cos(th) + cos(th)**2 + sin(th)**2
cos(th)**2 + sin(th)**2
sqrt(2 * (1 - cos(th)))
2 * sin(th/2)
plt.plot(2 * (2 * sin(np.linspace(0,pi)/4)))
plt.ylim(0,4)
plt.plot(4 * (2 * sin(np.linspace(0,pi)/4))**2)
plt.ylim(0,10)
np.linspace(0,pi)
np.array(R2) - np.array(R1)
R2
R1
np.linalg.norm(R2)
vsr.EGA(Rs.rot()) - vsr.EGA(1,0,0,0,0,0,0,0) * (vsr.EGA(Rs.rot()) + vsr.EGA(1,0,0,0,0,0,0,0)).inv()
vsr.EGA(Rs.rot()) - vsr.EGA(1,0,0,0,0,0,0,0)
(vsr.EGA(Rs.rot()) + vsr.EGA(1,0,0,0,0,0,0,0)).inv()
Rs + one
Rs - one
(Rs + one).rev()
(Rs + one).inv()
A = (Rs + 1) * (Rs-one).inv()
CayleySelig(A)
CayleySelig(A) * CayleySelig(A).rev()
vsr.Vec(0,0,0).null().spin(CayleySelig(A))
CayleySelig(B)
I * a
M = B.exp()
B1 = (vsr.Vec(0,0,1).trs() * (vsr.Biv(1,0,0).unit() * (pi/6.0)).exp()).log()
M1 = B1.exp()
B2 = (vsr.Vec(0,0,2).trs() * (vsr.Biv(1,0,0).unit() * (pi/4.0)).exp()).log()
M2 = B2.exp()
M = M2 * M1.rev()
np.linalg.norm(np.array(M) - np.array([1,0,0,0,0,0,0,0]))
np.linalg.norm(np.array(M2.rot() * M1.rev().rot()))
 np.linalg.norm(np.array(M2.rot())) * np.linalg.norm(np.array(M1.rev().rot()))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.3297901335513764, 'fraction_numerical': 0.1076587626056146, 'mean_word_length': 3.519704433497537, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '469684', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 2332, 'n_tokens_neox': 2238, 'n_words': 332, 'path': 'python/Conformal Cayley.ipynb', 'repo_name': 'tingelst/game', 'size': '3669'}