From: Matt Birkholz Date: Tue, 9 Apr 2013 21:39:51 +0000 (-0700) Subject: planetarium: Replace "tellurian" with "tellurion". X-Git-Tag: mit-scheme-pucked-9.2.12~512 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=cd9be43a2094b194dc685869b163acd16e0cdd2e;p=mit-scheme.git planetarium: Replace "tellurian" with "tellurion". --- diff --git a/src/planetarium/TODO b/src/planetarium/TODO index ea4ba2303..2ee89f8bb 100644 --- a/src/planetarium/TODO +++ b/src/planetarium/TODO @@ -1,13 +1,12 @@ -*-Text-*- -Obviously half a tellurian does not a planetarium make. +Obviously a simple tellurion does not a planetarium make. -Finish the tellurian. Draw a little moon icon on the globe at the +Finish the tellurion. Draw a little moon icon on the globe at the lat/long of the Moon. Draw it in dotted lines when it is hidden. -Include its phase. Draw a sun icon too. Other views: Earth and -Moon from celestial North, Earth and Moon and Sun from N inside -celestial grid showing mean equinox of the date, precession animation, -etc. etc. +Include its phase. Draw a sun icon too. Other views: Earth and Moon +from celestial North, Earth and Moon and Sun from N, include celestial +grid showing mean equinox of the date, precession animation, etc. etc. Draw orbits and positions of the planets in the (inner) solar system from N (e.g. to answer a question like "Why is Curiosity having diff --git a/src/planetarium/compile.scm b/src/planetarium/compile.scm index 4522d9baf..c3c0c17fc 100644 --- a/src/planetarium/compile.scm +++ b/src/planetarium/compile.scm @@ -27,4 +27,4 @@ USA. `(("solar" "geometry") ("earth" "geometry" "matrices") ("mit-scheme-cil" "earth" ,@(directory-read "cil-*.txt")) - ("tellurian" "geometry" "matrices"))) \ No newline at end of file + ("tellurion" "geometry" "matrices"))) \ No newline at end of file diff --git a/src/planetarium/mit-scheme.scm b/src/planetarium/mit-scheme.scm index d4188cf42..17d0bc951 100644 --- a/src/planetarium/mit-scheme.scm +++ b/src/planetarium/mit-scheme.scm @@ -21,7 +21,7 @@ USA. |# -;;;; Load and run the planetarium (half a tellurian at the mo'). +;;;; Load and run the planetarium (just a tellurion at the mo'). (package/add-child! (find-package '()) 'planetarium (extend-top-level-environment (->environment '())) #t) @@ -56,8 +56,8 @@ USA. (compile-load "earth" '("matrices" "geometry")) (compile-load "mit-scheme-cil" (cons "earth" (directory-read "cil-*.txt"))) - (compile-load "tellurian" '("geometry" "matrices")) - (environment-link-name (->environment '()) env 'make-tellurian) + (compile-load "tellurion" '("geometry" "matrices")) + (environment-link-name (->environment '()) env 'make-tellurion) (cond ((not (ignore-errors? (lambda () (load-option 'gtk)))) (compile-load "mit-scheme-gtk")) ((graphics-type-available? 'x) diff --git a/src/planetarium/planetarium.pkg b/src/planetarium/planetarium.pkg index 63a4698af..29168f2f1 100644 --- a/src/planetarium/planetarium.pkg +++ b/src/planetarium/planetarium.pkg @@ -60,9 +60,9 @@ USA. "time" "solar" "earth" - "tellurian") + "tellurion") (export () - make-tellurian)) + make-tellurion)) (define-package (planetarium gtk-graphics) (parent ()) diff --git a/src/planetarium/snapshot.scm b/src/planetarium/snapshot.scm index f1f2b8ba5..f8f1e6b27 100644 --- a/src/planetarium/snapshot.scm +++ b/src/planetarium/snapshot.scm @@ -36,7 +36,7 @@ USA. (for-each (lambda (file) (compile-file file '() here) (load file)) '("mit-scheme-syntax" "geometry" "matrices" "time" "solar" "earth" - "mit-scheme-cil" "tellurian" "mit-scheme-gtk"))))) + "mit-scheme-cil" "tellurion" "mit-scheme-gtk"))))) (let ((time (get-universal-time)) (latitude 33.3) @@ -44,7 +44,7 @@ USA. (device (gtk-graphics/make 400 400))) (graphics-set-coordinate-limits device -1.1 -1.1 1.1 1.1) - (draw-tellurian device time (make-latitude/longitude latitude longitude)) + (draw-tellurion device time (make-latitude/longitude latitude longitude)) (let ((surface (surface-ink-surface (graphics-device/descriptor device)))) - (cairo-surface-write-to-png surface "tellurian.png") + (cairo-surface-write-to-png surface "tellurion.png") (cairo-surface-destroy surface))) \ No newline at end of file diff --git a/src/planetarium/tellurian.scm b/src/planetarium/tellurion.scm similarity index 95% rename from src/planetarium/tellurian.scm rename to src/planetarium/tellurion.scm index 23d83b64b..b6455eebf 100644 --- a/src/planetarium/tellurian.scm +++ b/src/planetarium/tellurion.scm @@ -24,7 +24,7 @@ USA. (declare (usual-integrations) (integrate-external "geometry" "matrices")) -(define (make-tellurian) +(define (make-tellurion) (test-julian-day) (test-greenwich-mean-sidereal-time) (test-solar-latitude/longitude) @@ -32,7 +32,7 @@ USA. (define (queue! command . args) (thread-queue/queue! queue (cons command args)) unspecific) - (detach-thread (create-thread #f (lambda () (run-tellurian queue)))) + (detach-thread (create-thread #f (lambda () (run-tellurion queue)))) (lambda (keyword . args) (cond ((eq? keyword 'TURN-TO) (let ((lat (->flonum (car args))) @@ -59,14 +59,14 @@ USA. (queue! queue 'go)) (else (error "unknown command:" keyword args)))))) -(define (run-tellurian queue) +(define (run-tellurion queue) (let ((device (make-suitable-graphics-device)) ;; Latitude and longitude per GPS -- positive degrees long. to the east. (lat/long (make-latitude/longitude 23.271 0.)) (time (get-universal-time)) (stopped? #f)) (define-integrable (draw) - (draw-tellurian device time lat/long)) + (draw-tellurion device time lat/long)) (draw) (let loop () (let ((command (if stopped? @@ -110,14 +110,14 @@ USA. (draw)))) (loop)))) -(define draw-tellurian +(define draw-tellurion (let ((lat/long-pos (make-2d-point -1. -1.02)) (time-pos (make-2d-point -1. 1.)) (cross-hair-left (make-2d-point -.02 0.)) (cross-hair-right (make-2d-point .02 0.)) (cross-hair-top (make-2d-point 0. .02)) (cross-hair-bottom (make-2d-point 0. -.02))) - (named-lambda (draw-tellurian device time lat/long) + (named-lambda (draw-tellurion device time lat/long) (graphics-clear device) (draw-text device time-pos (universal-time->string time) "black") (draw-text device lat/long-pos (latitude/longitude-string lat/long) "black")