From 5a44d113571ca634c8582655130a2bb324a27e42 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Tue, 3 Feb 2009 03:48:29 -0500 Subject: 02feb partial checkin --- journal/02feb2009-evolve-circle-01.png | Bin 0 -> 1626 bytes journal/02feb2009-evolve-circle-02.png | Bin 0 -> 3557 bytes journal/02feb2009.html | 103 +++++++++++++++++++++++++++++++++ journal/27jan2009.html | 3 +- 4 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 journal/02feb2009-evolve-circle-01.png create mode 100644 journal/02feb2009-evolve-circle-02.png create mode 100644 journal/02feb2009.html (limited to 'journal') diff --git a/journal/02feb2009-evolve-circle-01.png b/journal/02feb2009-evolve-circle-01.png new file mode 100644 index 0000000..5413333 Binary files /dev/null and b/journal/02feb2009-evolve-circle-01.png differ diff --git a/journal/02feb2009-evolve-circle-02.png b/journal/02feb2009-evolve-circle-02.png new file mode 100644 index 0000000..e2f23dc Binary files /dev/null and b/journal/02feb2009-evolve-circle-02.png differ diff --git a/journal/02feb2009.html b/journal/02feb2009.html new file mode 100644 index 0000000..7f29192 --- /dev/null +++ b/journal/02feb2009.html @@ -0,0 +1,103 @@ + + +bnewbold thesis + +

+Journal: Jan 27, 2009

+Bryan Newbold, bnewbold@mit.edu
+ +http://web.mit.edu/bnewbold/thesis/ +

+ + + +Playing with crude evolution of basic differential equations: + +

+(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 '->point) (up 1 0))))
+
+(pe ((((evolution 6) 2. J) R2-chi)
+     ((R2 '->point) (up 1 0))))
+
+(define mywindow (frame -4 4 -4 4))
+
+(define (plot-evolution win order initial a step)
+  (letrec 
+      ((dostep 
+	(lambda (val)
+	  (cond
+	   ((< val a) (let ((this-point ((((evolution order) val J) R2-chi)
+					 ((R2 '->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)
+
+
+ +
+Haha, not really what you'd expect at the end there... numerical error? +
+And then interactively: +
+(define (explore-evolution window order length)
+  (define (iterate-mything i x y)
+    (if (< i length)
+	(let ((this-point ((((evolution order) i J) R2-chi)
+			   ((R2 '->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)
+
+ +
+That looks a lot better! +

+(previous entry) + + + + + diff --git a/journal/27jan2009.html b/journal/27jan2009.html index 1677b17..7604d11 100644 --- a/journal/27jan2009.html +++ b/journal/27jan2009.html @@ -26,7 +26,8 @@ autocomplete variables in scheme buffers... which is very hard so I just bound Super-TAB instead. Ugh.

-(previous entry) +(previous entry) - +(next entry) -- cgit v1.2.3