C.R.A.S.H.: Building a NASA Asteroid Impact Simulator in 32 Hours

Postmortem of the NSAC2025 hackathon project where we built a 3D asteroid impact simulator using real NASA data, CesiumJS, and Three.js in just 32 hours.

C.R.A.S.H.: Building a NASA Asteroid Impact Simulator in 32 Hours

The Challenge

NSAC2025 (NASA Space Apps Challenge) - 32 hours to build something meaningful with NASA's open data. Our team chose the "Asteroid Impact Simulation" challenge.

The Stack (Chosen for Speed)

Architecture Decisions

1. Split Rendering: Cesium for Globe, Three.js for Effects

Cesium handles the Earth, terrain, and satellite imagery. Three.js overlays custom asteroid trajectories, impact effects, and particle systems.

// Cesium viewer setup
const viewer = new Cesium.Viewer('cesiumContainer', {
  terrainProvider: Cesium.createWorldTerrain(),
  imageryProvider: new Cesium.IonImageryProvider({ assetId: 3954 })
});

// Three.js overlay for custom effects
const threeScene = new THREE.Scene();
const asteroidMesh = createAsteroidMesh(data.diameter);

2. NASA Data Pipeline

Real-time data from:

# FastAPI endpoint
@app.get("/api/asteroids")
async def get_asteroids():
    neo_data = await fetch_nasa_neo()
    sentry_data = await fetch_sentry_risk()
    return combine_and_enrich(neo_data, sentry_data)

3. Impact Physics Simulation

Simplified but visually accurate:

What Went Well

  1. Pre-hackathon prep - We set up the Cesium + Three.js integration the week before
  2. Clear data contracts - TypeScript interfaces matched Python Pydantic models
  3. Parallel workstreams - One person on data, one on 3D, one on UI
  4. Scope discipline - Cut features ruthlessly (no user accounts, no saving)

What We'd Do Differently

  1. Better state management - React Context got messy with 3D scene state
  2. Automated deployment - Manual Vercel + Railway deploys wasted time
  3. More NASA data caching - API rate limits hit during demo

The Result

Key Takeaways for Hackathons

Links

Linktree