aboutsummaryrefslogtreecommitdiffstats
path: root/work
diff options
context:
space:
mode:
Diffstat (limited to 'work')
-rw-r--r--work/funcdiff_play.scm93
1 files changed, 92 insertions, 1 deletions
diff --git a/work/funcdiff_play.scm b/work/funcdiff_play.scm
index 429933c..482f0f3 100644
--- a/work/funcdiff_play.scm
+++ b/work/funcdiff_play.scm
@@ -157,7 +157,7 @@
((R2 '->point) (up 1 0))))
#|
-
+; super chunky, i would rewrite these for sure
(define mywindow (frame -4 4 -4 4))
(define (plot-evolution win order initial a step)
@@ -210,3 +210,94 @@
(explore-evolution mywindow 5 .4)
|#
+
+(define R3 (rectangular 3))
+(instantiate-coordinates R3 '(x y z))
+(define R3-chi (R3 '->coords))
+(define R3-chi-inverse (R3 '->point))
+(define R3->R (-> (UP Real Real Real) Real))
+(define R3-point (R3-chi-inverse (up 'x0 'y0 'z0)))
+
+(define omega (literal-1form-field 'omega R3))
+
+(define v (literal-vector-field 'v R3))
+(define w (literal-vector-field 'w R3))
+(define c (literal-manifold-function 'c R3))
+
+(pe ((- (omega (+ v w)) (+ (omega v) (omega w))) R3-point))
+;0
+
+(pe ((- (omega (* c v)) (* c (omega v))) R3-point))
+;0
+
+(define omega
+ (components->1form-field
+ (down (literal-manifold-function 'a_0 R3)
+ (literal-manifold-function 'a_1 R3)
+ (literal-manifold-function 'a_2 R3))
+ R3))
+
+(pe ((dx d/dx) R3-point))
+; 1
+
+(pe ((omega (literal-vector-field 'v R3)) R3-point))
+
+; back to R2?
+(instantiate-coordinates R2 '(x y))
+(pe ((dy J) R2-point))
+
+(define e0
+ (+ (* (literal-manifold-function 'e0x R2) d/dx)
+ (* (literal-manifold-function 'e0y R2) d/dy)))
+
+(define e1
+ (+ (* (literal-manifold-function 'e1x R2) d/dx)
+ (* (literal-manifold-function 'e2x R2) d/dy)))
+
+(define e-vector-basis (down e0 e1))
+(define e-dual-basis (vector-basis->dual e-vector-basis P2))
+
+;(pe ((e-dual-basis e-vector-basis) m))
+; TODO: m undefined
+
+(define l-m-f literal-manifold-function) ; type this a lot!
+
+(define v
+ (* e-vector-basis
+ (up (l-m-f 'bx R2)
+ (l-m-f 'by R2))))
+
+#|
+(pe ((e-dual-basis v) R2-point))
+; takes a super long time... still have R3 definitions?
+
+(let ((polar-vector-basis (basis->vector-basis polar-basis))
+ (polar-dual-basis (basis->1form-basis polar-basis)))
+ (pe ((- (commutator e0 e1 f)
+ (* (- (e0 (polar-dual-basis e1))
+ (e1 (polar-dual-basis e0)))
+ (polar-vector-basis f)))
+ R2-point)))
+
+; TODO: missing defs... goddamn it's cold
+
+|#
+
+; back to R3
+(define R3 (rectangular 3))
+(instantiate-coordinates R3 '(x y z))
+(define R3->R (-> (UP Real Real Real) Real))
+(define g
+ (compose (literal-function 'g R3->R)
+ (R3 '->coords)))
+(define R3-point ((R3 '->point) (up 'x 'y 'z)))
+
+(define Jz (- (* x d/dy) (* y d/dx)))
+(define Jx (- (* y d/dz) (* z d/dy)))
+(define Jy (- (* z d/dx) (* x d/dz)))
+
+(pe (((+ (commutator Jx Jy) Jz) g) R3-point))
+; 0
+; so [Jx,Jy] = -Jz, nice
+
+; @ p21? \ No newline at end of file