A = A + A__x*e_x + A__y*e_y + A__z*e_z + A__xy*e_x^e_y + A__xz*e_x^e_z + A__yz*e_y^e_z + A__xyz*e_x^e_y^e_z
A = A
+ A__x*e_x + A__y*e_y + A__z*e_z
+ A__xy*e_x^e_y + A__xz*e_x^e_z + A__yz*e_y^e_z
+ A__xyz*e_x^e_y^e_z
A = A
+ A__x*e_x
+ A__y*e_y
+ A__z*e_z
+ A__xy*e_x^e_y
+ A__xz*e_x^e_z
+ A__yz*e_y^e_z
+ A__xyz*e_x^e_y^e_z
g_{ij} =
Matrix([
[(e_x.e_x), (e_x.e_y), (e_x.e_z)],
[(e_x.e_y), (e_y.e_y), (e_y.e_z)],
[(e_x.e_z), (e_y.e_z), (e_z.e_z)]])
X = X__x*e_x + X__y*e_y + X__z*e_z
Y = Y__x*e_x + Y__y*e_y + Y__z*e_z
X*Y = (e_x.e_x)*X__x*Y__x + (e_x.e_y)*X__x*Y__y + (e_x.e_y)*X__y*Y__x + (e_x.e_z)*X__x*Y__z + (e_x.e_z)*X__z*Y__x + (e_y.e_y)*X__y*Y__y + (e_y.e_z)*X__y*Y__z + (e_y.e_z)*X__z*Y__y + (e_z.e_z)*X__z*Y__z
+ (X__x*Y__y - X__y*Y__x)*e_x^e_y + (X__x*Y__z - X__z*Y__x)*e_x^e_z + (X__y*Y__z - X__z*Y__y)*e_y^e_z
X^Y = (X__x*Y__y - X__y*Y__x)*e_x^e_y + (X__x*Y__z - X__z*Y__x)*e_x^e_z + (X__y*Y__z - X__z*Y__y)*e_y^e_z
X|Y = (e_x.e_x)*X__x*Y__x + (e_x.e_y)*X__x*Y__y + (e_x.e_y)*X__y*Y__x + (e_x.e_z)*X__x*Y__z + (e_x.e_z)*X__z*Y__x + (e_y.e_y)*X__y*Y__y + (e_y.e_z)*X__y*Y__z + (e_y.e_z)*X__z*Y__y + (e_z.e_z)*X__z*Y__z
g_{ij} =
Matrix([
[(e_x.e_x), (e_x.e_y)],
[(e_x.e_y), (e_y.e_y)]])
X = X__x*e_x + X__y*e_y
A = A + A__xy*e_x^e_y
X|A = -A__xy*((e_x.e_y)*X__x + (e_y.e_y)*X__y)*e_x + A__xy*((e_x.e_x)*X__x + (e_x.e_y)*X__y)*e_y
X<A = -A__xy*((e_x.e_y)*X__x + (e_y.e_y)*X__y)*e_x + A__xy*((e_x.e_x)*X__x + (e_x.e_y)*X__y)*e_y
A>X = A__xy*((e_x.e_y)*X__x + (e_y.e_y)*X__y)*e_x - A__xy*((e_x.e_x)*X__x + (e_x.e_y)*X__y)*e_y
g_{ii} =
Matrix([
[1, 0],
[0, 1]])
X = X__x*e_x + X__y*e_y
A = A + A__xy*e_x^e_y
X*A = (A*X__x - A__xy*X__y)*e_x + (A*X__y + A__xy*X__x)*e_y
X|A = -A__xy*X__y*e_x + A__xy*X__x*e_y
X<A = -A__xy*X__y*e_x + A__xy*X__x*e_y
X>A = A*X__x*e_x + A*X__y*e_y
A*X = (A*X__x + A__xy*X__y)*e_x + (A*X__y - A__xy*X__x)*e_y
A|X = A__xy*X__y*e_x - A__xy*X__x*e_y
A<X = A*X__x*e_x + A*X__y*e_y
A>X = A__xy*X__y*e_x - A__xy*X__x*e_y
g_{ij} =
Matrix([
[(a.a), (a.b), (a.c), (a.d), (a.e)],
[(a.b), (b.b), (b.c), (b.d), (b.e)],
[(a.c), (b.c), (c.c), (c.d), (c.e)],
[(a.d), (b.d), (c.d), (d.d), (d.e)],
[(a.e), (b.e), (c.e), (d.e), (e.e)]])
a|(b*c) = -(a.c)*b + (a.b)*c
a|(b^c) = -(a.c)*b + (a.b)*c
a|(b^c^d) = (a.d)*b^c - (a.c)*b^d + (a.b)*c^d
a|(b^c)+c|(a^b)+b|(c^a) = (a.b)*c - (b.c)*a - ((a.b)*c - (b.c)*a)
a*(b^c)-b*(a^c)+c*(a^b) = 3*a^b^c
a*(b^c^d)-b*(a^c^d)+c*(a^b^d)-d*(a^b^c) = 4*a^b^c^d
(a^b)|(c^d) = -(a.c)*(b.d) + (a.d)*(b.c)
((a^b)|c)|d = -(a.c)*(b.d) + (a.d)*(b.c)
(a^b)x(c^d) = -(b.d)*a^c + (b.c)*a^d + (a.d)*b^c - (a.c)*b^d
(a|(b^c))|(d^e) = (-(a.b)*(c.e) + (a.c)*(b.e))*d + ((a.b)*(c.d) - (a.c)*(b.d))*e
f = f
A = A__x*e_x + A__y*e_y + A__z*e_z
B = B__xy*e_x^e_y + B__xz*e_x^e_z + B__yz*e_y^e_z
C = C + C__x*e_x + C__y*e_y + C__z*e_z + C__xy*e_x^e_y + C__xz*e_x^e_z + C__yz*e_y^e_z + C__xyz*e_x^e_y^e_z
grad*f = D{x}f*e_x + D{y}f*e_y + D{z}f*e_z
grad|A = D{x}A__x + D{y}A__y + D{z}A__z
grad*A = D{x}A__x + D{y}A__y + D{z}A__z + (-D{y}A__x + D{x}A__y)*e_x^e_y + (-D{z}A__x + D{x}A__z)*e_x^e_z + (-D{z}A__y + D{y}A__z)*e_y^e_z
-I*(grad^A) = (-D{z}A__y + D{y}A__z)*e_x + (D{z}A__x - D{x}A__z)*e_y + (-D{y}A__x + D{x}A__y)*e_z
grad*B = (-D{y}B__xy - D{z}B__xz)*e_x + (D{x}B__xy - D{z}B__yz)*e_y + (D{x}B__xz + D{y}B__yz)*e_z + (D{z}B__xy - D{y}B__xz + D{x}B__yz)*e_x^e_y^e_z
grad^B = (D{z}B__xy - D{y}B__xz + D{x}B__yz)*e_x^e_y^e_z
grad|B = (-D{y}B__xy - D{z}B__xz)*e_x + (D{x}B__xy - D{z}B__yz)*e_y + (D{x}B__xz + D{y}B__yz)*e_z
grad<A = D{x}A__x + D{y}A__y + D{z}A__z
grad>A = D{x}A__x + D{y}A__y + D{z}A__z
grad<B = (-D{y}B__xy - D{z}B__xz)*e_x + (D{x}B__xy - D{z}B__yz)*e_y + (D{x}B__xz + D{y}B__yz)*e_z
grad>B = 0
grad<C = D{x}C__x + D{y}C__y + D{z}C__z + (-D{y}C__xy - D{z}C__xz)*e_x + (D{x}C__xy - D{z}C__yz)*e_y + (D{x}C__xz + D{y}C__yz)*e_z + D{z}C__xyz*e_x^e_y - D{y}C__xyz*e_x^e_z + D{x}C__xyz*e_y^e_z
grad>C = D{x}C__x + D{y}C__y + D{z}C__z + D{x}C*e_x + D{y}C*e_y + D{z}C*e_z
f = f
A = A__r*e_r + A__theta*e_theta + A__phi*e_phi
B = B__rtheta*e_r^e_theta + B__rphi*e_r^e_phi + B__thetaphi*e_theta^e_phi
grad*f = D{r}f*e_r + D{theta}f*e_theta/r + D{phi}f*e_phi/(r*sin(theta))
grad|A = D{r}A__r + (A__r + D{theta}A__theta)/r + (A__r*sin(theta) + A__theta*cos(theta) + D{phi}A__phi)/(r*sin(theta))
-I*(grad^A) = (A__phi/tan(theta) + D{theta}A__phi - D{phi}A__theta/sin(theta))*e_r/r + (-r*D{r}A__phi - A__phi + D{phi}A__r/sin(theta))*e_theta/r + (r*D{r}A__theta + A__theta - D{theta}A__r)*e_phi/r
grad^B = (r*D{r}B__thetaphi - B__rphi/tan(theta) + 2*B__thetaphi - D{theta}B__rphi + D{phi}B__rtheta/sin(theta))*e_r^e_theta^e_phi/r
X = 1.2*e_x + 2.34*e_y + 0.555*e_z
Nga(X,2) = 1.2*e_x + 2.3*e_y + 0.55*e_z
X*Y = 12.7011000000000 + 4.02078*e_x^e_y + 6.175185*e_x^e_z + 10.182*e_y^e_z
Nga(X*Y,2) = 13. + 4.0*e_x^e_y + 6.2*e_x^e_z + 10.0*e_y^e_z
g_{ij} = Matrix([
[ 0, (X.Y), (X.e)],
[(X.Y), 0, (Y.e)],
[(X.e), (Y.e), 1]])
(X^Y)**2 = (X.Y)**2
B = X^Y - (Y.e)*X^e + (X.e)*Y^e
B**2 = 3*(X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e) + 2*(X.Y)*(X.e)*Y^e - 2*(X.Y)*(X.e)*((Y.e) + Y^e) - 2*(X.Y)*(Y.e)*X^e + 2*(X.Y)*(Y.e)*((X.e) + X^e) + 2*(X.Y)*X^Y - 2*(X.Y)*((X.Y) + X^Y)
#L = X^Y^e is a non-euclidian line
B = L*e = X^Y - (Y.e)*X^e + (X.e)*Y^e
B*e*B.rev() = (X.Y)*(-(X.Y) + 2*(X.e)*(Y.e))*e
B**2 = (X.Y)*((X.Y) - 2*(X.e)*(Y.e))
L**2 = (X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e)
s = sinh(alpha/2) and c = cosh(alpha/2)
exp(alpha*B/(2*|B|)) = c + (1/B)*s*X^Y - (Y.e)*(1/B)*s*X^e + (X.e)*(1/B)*s*Y^e
R*X*R.rev() = ((X.Y)**2*(1/B)**2*s**2 - 2*(X.Y)*(X.e)*(Y.e)*(1/B)**2*s**2 + 2*(X.Y)*(1/B)*c*s - 2*(X.e)*(Y.e)*(1/B)*c*s + c**2)*X
+ 2*(X.e)**2*(1/B)*c*s*Y
+ 2*(X.Y)*(X.e)*(1/B)*s*(-(X.Y)*(1/B)*s + 2*(X.e)*(Y.e)*(1/B)*s - c)*e
Objective is to determine value of C = cosh(alpha) such that W = 0
Z|Y = (X.Y)**3*(1/B)**2*s**2 - 4*(X.Y)**2*(X.e)*(Y.e)*(1/B)**2*s**2 + 2*(X.Y)**2*(1/B)*c*s + 4*(X.Y)*(X.e)**2*(Y.e)**2*(1/B)**2*s**2 - 4*(X.Y)*(X.e)*(Y.e)*(1/B)*c*s + (X.Y)*c**2
S = sinh(alpha) and C = cosh(alpha)
W = (X.Y)*(1/B)*C*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e)) - (X.e)*(Y.e)*(1/B)*C*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e)) + (X.e)*(Y.e)*(1/B)*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e)) + S*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e))
Wd = {S: sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e)), C: (X.Y)*(1/B)*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e)) - (X.e)*(Y.e)*(1/B)*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e)), 1: (X.e)*(Y.e)*(1/B)*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e))}
Scalar Coefficient = (X.e)*(Y.e)*(1/B)*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e))
Cosh Coefficient = (X.Y)*(1/B)*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e)) - (X.e)*(Y.e)*(1/B)*sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e))
Sinh Coefficient = sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e))
|B| = sqrt((X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e))
Require a*C**2+b*C+c = 0
a = (X.e)**2*(Y.e)**2
b = 2*(X.e)*(Y.e)*((X.Y) - (X.e)*(Y.e))
c = (X.Y)**2 - 2*(X.Y)*(X.e)*(Y.e) + (X.e)**2*(Y.e)**2
cosh(alpha) = C = -b/(2*a) = -(X.Y)/((X.e)*(Y.e)) + 1
g_{ij} =
Matrix([
[1, 0, 0, 0, 0],
[0, 1, 0, 0, 0],
[0, 0, 1, 0, 0],
[0, 0, 0, 0, 2],
[0, 0, 0, 2, 0]])
F(a) = e_1 + n/2 - nbar/2
F(b) = e_2 + n/2 - nbar/2
F(c) = -e_1 + n/2 - nbar/2
F(d) = e_3 + n/2 - nbar/2
F(x) = x1*e_1 + x2*e_2 + x3*e_3 + (x1**2/2 + x2**2/2 + x3**2/2)*n - nbar/2
a = e1, b = e2, c = -e1, and d = e3
A = F(a) = 1/2*(a*a*n+2*a-nbar), etc.
Circle through a, b, and c
Circle: A^B^C^X = 0 = -x3*e_1^e_2^e_3^n + x3*e_1^e_2^e_3^nbar + (x1**2/2 + x2**2/2 + x3**2/2 - 1/2)*e_1^e_2^n^nbar
Line through a and b
Line : A^B^n^X = 0 = -x3*e_1^e_2^e_3^n + (x1/2 + x2/2 - 1/2)*e_1^e_2^n^nbar + x3*e_1^e_3^n^nbar/2 - x3*e_2^e_3^n^nbar/2
Sphere through a, b, c, and d
Sphere: A^B^C^D^X = 0 = (-x1**2/2 - x2**2/2 - x3**2/2 + 1/2)*e_1^e_2^e_3^n^nbar
Plane through a, b, and d
Plane : A^B^n^D^X = 0 = (-x1/2 - x2/2 - x3/2 + 1/2)*e_1^e_2^e_3^n^nbar
Hyperbolic Circle: (A^B^e)^X = 0 = = -x3*e_1^e_2^e_3^n
- x3*e_1^e_2^e_3^nbar
+ (-x1**2/2 + x1 - x2**2/2 + x2 - x3**2/2 - 1/2)*e_1^e_2^n^nbar
+ x3*e_1^e_3^n^nbar
- x3*e_2^e_3^n^nbar
g_{ij} =
Matrix([
[(p1.p1), (p1.p2), (p1.p3), 0, 0],
[(p1.p2), (p2.p2), (p2.p3), 0, 0],
[(p1.p3), (p2.p3), (p3.p3), 0, 0],
[ 0, 0, 0, 0, 2],
[ 0, 0, 0, 2, 0]])
Extracting direction of line from L = P1^P2^n
(L|n)|nbar = 2*p1 - 2*p2
Extracting plane of circle from C = P1^P2^P3
((C^n)|n)|nbar = 2*p1^p2 - 2*p1^p3 + 2*p2^p3
(p2-p1)^(p3-p1) = p1^p2 - p1^p3 + p2^p3
g_{ij} =
Matrix([
[ 0, -1, (P1.a)],
[ -1, 0, (P2.a)],
[(P1.a), (P2.a), (a.a)]])
B**2 = 1
a' = a-(a^B)*B = -(P2.a)*P1 - (P1.a)*P2
A+ = a'+a'*B = -2*(P2.a)*P1
A- = a'-a'*B = -2*(P1.a)*P2
(A+)^2 = 0
(A-)^2 = 0
a|B = -(P2.a)*P1 + (P1.a)*P2
g_{ij} =
Matrix([
[ 1, (e1.e2), (e1.e3)],
[(e1.e2), 1, (e2.e3)],
[(e1.e3), (e2.e3), 1]])
E = e1^e2^e3
E**2 = (e1.e2)**2 - 2*(e1.e2)*(e1.e3)*(e2.e3) + (e1.e3)**2 + (e2.e3)**2 - 1
E1 = (e2^e3)*E = ((e2.e3)**2 - 1)*e1 + ((e1.e2) - (e1.e3)*(e2.e3))*e2 + (-(e1.e2)*(e2.e3) + (e1.e3))*e3
E2 =-(e1^e3)*E = ((e1.e2) - (e1.e3)*(e2.e3))*e1 + ((e1.e3)**2 - 1)*e2 + (-(e1.e2)*(e1.e3) + (e2.e3))*e3
E3 = (e1^e2)*E = (-(e1.e2)*(e2.e3) + (e1.e3))*e1 + (-(e1.e2)*(e1.e3) + (e2.e3))*e2 + ((e1.e2)**2 - 1)*e3
E1|e2 = 0
E1|e3 = 0
E2|e1 = 0
E2|e3 = 0
E3|e1 = 0
E3|e2 = 0
(E1|e1)/E**2 = 1
(E2|e2)/E**2 = 1
(E3|e3)/E**2 = 1
e3d.g = Matrix([
[1, 0, 0],
[0, 1, 0],
[0, 0, 1]])
Signature = (3,0) I = e1^e2^e3 I**2 = -1
e3d.g = Matrix([
[2, 0, 0],
[0, 2, 0],
[0, 0, 2]])
Signature = (3,0) I = sqrt(2)*e1^e2^e3/4 I**2 = -1
e3d.g = Matrix([
[1, 0, 0, 0],
[0, -1, 0, 0],
[0, 0, -1, 0],
[0, 0, 0, -1]])
Signature = (1,3) I = e1^e2^e3^e4 I**2 = -1
e3d.g = Matrix([
[2, 0, 0, 0],
[0, -2, 0, 0],
[0, 0, -2, 0],
[0, 0, 0, -2]])
Signature = (1,3) I = e1^e2^e3^e4/4 I**2 = -1
e4d.g = Matrix([
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]])
Signature = (4,0) I = e1^e2^e3^e4 I**2 = 1
cf4d.g = Matrix([
[1, 0, 0, 0, 0],
[0, 1, 0, 0, 0],
[0, 0, 1, 0, 0],
[0, 0, 0, 1, 0],
[0, 0, 0, 0, -1]])
Signature = (4,1) I = e1^e2^e3^e4^e5 I**2 = -1
cf4d.g = Matrix([
[2, 0, 0, 0, 0],
[0, 2, 0, 0, 0],
[0, 0, 2, 0, 0],
[0, 0, 0, 2, 0],
[0, 0, 0, 0, -2]])
Signature = (4,1) I = sqrt(2)*e1^e2^e3^e4^e5/8 I**2 = -1