aboutsummaryrefslogtreecommitdiffstats
path: root/journal/02feb2009.html
blob: dea6f5369a08ff4d6d954e581a7b452f8c27bf49 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>bnewbold thesis</title></head>
<body style="margin: 25px; font-family: helvetica;">
<h1 style="border-bottom: 2px solid;">
Journal: Feb 02, 2009</h1>
<i>Bryan Newbold, <a href="mailto:bnewbold@mit.edu">bnewbold@mit.edu</a></i><br />
<i><a href="http://web.mit.edu/bnewbold/thesis/">
http://web.mit.edu/bnewbold/thesis/</a></i>
<br /><p />
<!-- ================================================================ -->
<!-- ================================================================ -->

Playing with crude evolution of basic differential equations:

<pre style="margin:20px; border-left: solid grey 3px; background-color:lightgrey
;padding:5px;width:750px;">
(define J (- (* x d/dy) (* y d/dx)))

(define ((((evolution order)
	   delta-t vector-field)
	  manifold-function)
	 manifold-point)
  (series:sum
   (((exp (* delta-t vector-field))
     manifold-function)
    manifold-point)
   order))

(pe ((((evolution 6) 'a J) R2-chi)
     ((R2 '-&gt;point) (up 1 0))))

(pe ((((evolution 6) 2. J) R2-chi)
     ((R2 '-&gt;point) (up 1 0))))

(define mywindow (frame -4 4 -4 4))

(define (plot-evolution win order initial a step)
  (letrec 
      ((dostep 
	(lambda (val)
	  (cond
	   ((&lt; val a) (let ((this-point ((((evolution order) val J) R2-chi)
					 ((R2 '-&gt;point) initial))))
			(plot-point win
				    (time this-point)
				    (coordinate this-point))
			(dostep (+ val step))))))))
    (dostep 0.)))

(plot-evolution mywindow 6 (up 1. 0.) 6. .01)
</pre>
<br />
<img src="02feb2009-evolve-circle-01.png" />
<br />
Haha, not really what you'd expect at the end there... numerical error? 
<br />
And then interactively:
<pre style="margin:20px; border-left: solid grey 3px; background-color:lightgrey
;padding:5px;width:750px;">
(define (explore-evolution window order length)
  (define (iterate-mything i x y)
    (if (&lt; i length)
	(let ((this-point ((((evolution order) i J) R2-chi)
			   ((R2 '-&gt;point) (up x y)))))
	  (plot-point window (time this-point) (coordinate this-point))
	  (iterate-mything (+ .01 i) x y))
	(button-loop x y)))
  (define (button-loop ox oy)
    (pointer-coordinates
     window
     (lambda (x y button)
       (let ((temp button))
         (cond ((eq? temp 0) (write-line (cons x (cons y (quote ()))))
                             (display " started.")
                             (iterate-mything 0 x y))
               ((eq? temp 1) (write-line (cons ox (cons oy (quote ()))))
                             (display " continued.")
                             (iterate-mything 0 ox oy))
               ((eq? temp 2) (write-line (cons x (cons y (quote ()))))
                             (display " hit.")
                             (button-loop ox oy)))))))
  (newline)
  (display "Left button starts a trajectory.")
  (newline)
  (display "Middle button continues a trajectory.")
  (newline)
  (display "Right button interrogates coordinates.")
  (button-loop 0. 0.))

(explore-evolution mywindow 5 .4)
</pre>
<img src="02feb2009-evolve-circle-02.png" />
<br />
That looks a lot better!
<p />
I don't know why I didn't notice it earlier, but the way dx, d/dx, etc are
defined is the instantiate-coordinates procedure.  
<p />
There's definately some funky funk in the original differential geometry memo
around page 20 w/r/t R2 vs R3 coordinates.
<p />
From page 28: "You can tell if a set of basis vector fields is a coordinate 
basis by calculating the commutators. If they are non-zero, then the basis
is not a coordinate basis." Isn't that just for orthogonal bases? Need to think
this through.

<br /><br /> 
<a href="27jan2009.html"><i>(previous entry)</i></a> - 
<a href="04feb2009.html"><i>(next entry)</i></a>

<!-- ================================================================ -->
<!-- ================================================================ -->
</body>
</html>