Skip to content

streamerd/antipodal-navigator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published