Giter Club home page Giter Club logo

antipodal-navigator's Introduction

Antipodal Globe Explorer

This application allows users to explore antipodal points on a 3D globe using Mapbox GL JS and Go Fiber. When a user clicks on any point on the globe, the application calculates its antipodal point* and smoothly flies to that location.

Inspired by Neil deGrasse Tyson's explanation of antipodal points: Startalk Short Video

Antipodal Points Navigator

What are Antipodal Points?

Antipodal points are two points on a sphere that are diametrically opposite to each other. On Earth, they are sometimes referred to as antipodes. If you were to draw a straight line from one point through the center of the Earth, it would emerge at the antipodal point.

Features

  • Interactive 3D globe using Mapbox GL JS
  • Click on any point to fly to its antipodal location
  • Display of starting and destination coordinates
  • Smooth animation using Mapbox's flyTo effect

Prerequisites

  • Go 1.16 or later
  • Mapbox API token

Setup

  1. Clone this repository:

git clone https://github.com/yourusername/antipodal-navigator.git && cd antipodal-navigator

  1. Install dependencies: go mod tidy

  2. Get a Mapbox API token:

  • Sign up at Mapbox
  • Navigate to your account's tokens page
  • Create a new token or use the default public token
  1. Set up your environment variables:
  • Copy the .env.example file to .env
  • Open .env and add your Mapbox token:
    MAPBOX_TOKEN=your_mapbox_public_key_here
    PORT=:3000
    

Running the Application (Dev mode)

  1. Set an environment var named DEV: export DEV=1

  2. Start the server: go run main.go

  3. Open a web browser and navigate to http://localhost:3000

  4. Click on any point on the globe to see the animation to its antipodal point!

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Neil deGrasse Tyson and Startalk for the inspiration
  • Mapbox for their excellent mapping platform
  • The Go Fiber team for the fast web framework

antipodal-navigator's People

Contributors

streamerd avatar

Stargazers

 avatar  avatar  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.