aboutsummaryrefslogtreecommitdiffstats
path: root/work/calculus_play.scm
blob: fe8a322a48843b5042241f8a3bb0a9a06651f407 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

;;; Jan 29th

(load "~/thesis/scmutils/src/calculus/load.scm")


;(define R2 (make-manifold R^n-type 2)) ; doesn't work, so...
(define R2 (rectangular 2))
;(define U (patch 'origin R2)) ; also undefined so going to AIM-2005-003.pdf

(define R2 (rectangular 2))
(define P2 (polar/cylindrical 2))

(define R2-chi-inverse (R2 '->point))
(define R2-chi-inverse (R2 '->coords))
(define P2-chi (P2 '->coords))
(define P2-chi-inverse (P2 '->point))

#|
(define cartesian-plane-basis
    (coordinate-system->basis cartesian-plane))
(define d/dx (coordinate-basis-vector-field cartesian-plane 'd/dx 0))
(define d/dy (coordinate-basis-vector-field cartesian-plane 'd/dy 1))
(define dx (coordinate-basis-1form cartesian-plane 'dx 0))
(define dy (coordinate-basis-1form cartesian-plane 'dy 0))


(define polar-basis (coordinate-system->basis polar))
(define r (compose (component 0) (polar '->coords)))
(define theta (compose (component 1) (polar '->coords)))
(define d/dr (coordinate-basis-vector-field polar 'd/dr 0))
(define d/dtheta (coordinate-basis-vector-field polar 'd/dtheta 1))
(define dr (coordinate-basis-1form polar 'dr 0))
(define dtheta (coordinate-basis-1form polar 'dtheta 1))

(define X
    (components->vector-field
         (up (literal-function 'X^0 (-> (UP Real Real) Real))
                    (literal-function 'X^1 (-> (UP Real Real) Real)))
            cartesian-plane
               'X))

(define V
    (components->vector-field
         (up (literal-function 'V^0 (-> (UP Real Real) Real))
                    (literal-function 'V^1 (-> (UP Real Real) Real)))
            cartesian-plane
               'V))
|#

;;; the following doesn't work at all...
;;; Jan 26th
#|
(declare (usual-integrations))
(load "~/thesis/scmutils/src/calculus/load.scm")


(define R2 (make-manifold R^n-type 2))
(define U (patch 'origin R2))

(load "~/thesis/scmutils/src/general/canonicalizer.scm")

(define d/dx (coordinate-basis-vector-field cart

(define J (- (* x d/dy) (* y (d/dx))))

(define omega (literal-1form-field 'a R2-rect))
|#