Git Product home page Git Product logo

mein-gott's Introduction

Mein Gott!

Interactive turntable of planetary maps in the Gott projection.

About

Azimuthal maps project views of planets from a perspective in space, "ray-tracing" to render 2D images of 3D spheres.

Two views from opposite poles can show an entire planet on-screen--in a strategy-based video game for example. This app began as a prototype by Chaoskampf Studios in 2019, using a Lambert azimuthal equal-area projection.

In 2021, Gott, Goldberg, and Vanderbei published a new method minimizing spatial distortion. This Double-Sided Gott Equidistant Azimuthal projection "is the most accurate flat map of Earth yet"! And the authors featured a similar two-hemisphere presentation--though focused on pedagogical use, especially paper maps.

In 2023, I discovered Dr. Robert Vanderbei's Javascript + WebGL animated Gott projection. This prompted dusting off the Chaoskampf prototype using his wider selection of map images. Credit to Dr. Vanderbei for the source cylindrical maps used to render Mein Gott! And check out his simulation as well.

Features

  • Spherical Geometry

    • Reprojects hemispheres from a single cylindrical projection
  • Physics Model

    • Applies angular momentum for animation
    • Grab to stop movement
    • Drag and release to impart momentum
  • Graphical Model

    • Subpixel precision and anti-aliasing
    • Random star background
    • Solar shadow
    • Key parallels (lines of longitude and latitude)
  • User Interface

    • Program and context menu controls
    • Dynamic resizing preserving aspect ratio
    • Configurable graphical options
  • Content

    • Select from multiple maps of different planets
    • Cache rendered images for fast switching

Controls

  • Left mouse button: grab and drag to stop or spin the map!

  • Right mouse button: select a different map. Please be patient for rendering the first time you load a map.

  • Mouse wheel: scroll the map forwards or backwards relative to the cursor.

  • Resize the window from the left or right border, and the height will adjust to preserve the map's aspect ratio.

  • You can change rendering options in the Options menu.

Implementation

Mein Gott! is written in Red, a full-stack compiled & dynamic language inspired by Carl Sassenrath's Rebol--the dynamic, human-friendly language that influenced Douglass Crockford's (static, crufty) JSON. Homoiconicity is key: code is data, and data is code. Red is a general-purpose toolkit for developing domain-specific languages or 'dialects' to suit particular tasks--which makes programming fun!

This app is largely a learning excercise for Red's:

  • cross-platform graphics engine Red/View
  • Visual interface dialect Red/Vid for reactive UI layouts
  • 2D Draw dialect Red/Draw which supports matrix transforms

Usage Notes

Mein Gott! can be run directly from the Red/View interpreter on supported platforms.

Pre-compiled binaries are provided for select platforms as well. These should load and initialize much faster than interpreting the script dynamically.

Note that Red is currently 32-bit only (Red is built in 32-bit Rebol 2, with migration to self-hosting with 64-bit support for Red 1.0. Red's initial development preceded 64-bit open-source Rebol 3). So you'll need appropriate 32-bit libraries on Linux while MacOS users may have to resort to a virtual machine, sorry!

Red apps are compiled directly to native system code without any external dependencies. It's a unique, self-contained toolchain. This uniqueness can trigger false positives from some anti-virus products. Please report false positives to your anti-virus vendor.

Compilation

With the Red Toolchain named redc.exe on Windows, compiling in release mode for the Windows platform:

redc.exe -r -t Windows mein-gott.red

Cross-compilation to other target platforms is easy:

redc.exe -r -t Linux mein-gott.red

References

mein-gott's People

Contributors

gr4xity avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.