CosmoRisk is a state-of-the-art, physics-accurate Near-Earth Object (NEO) tracking and deflection simulator. Built with Rust for computational precision and Three.js for cinematic visualization.
- N-Body Gravity Simulation - Accurate gravitational interactions between Sun, Earth, Moon, and thousands of asteroids
- NASA NeoWs Integration - Real asteroid data from NASA's Near-Earth Object Web Service
- Monte Carlo Impact Probability - Statistical impact risk analysis
- Kinetic Impactor - Instantaneous Δv impulse (DART-like)
- Ion Beam Deflection - Continuous low-thrust over extended duration
- Gravity Tractor - Passive gravitational deflection (backend)
- 3D Celestial Bodies - Sun (3-layer corona), Earth (blue marble + atmosphere), Moon
- Asteroid Rendering - Rocky brown material with faceted shading, LOD system
- Asteroid Trails - 50-point fading gradient trails
- Distance Lines - Visual connection from asteroid to Earth
- Post-Processing - Unreal Bloom, SSAO, FXAA for cinematic quality
- Torino Scale - 0-10 impact hazard classification based on kinetic energy (Joules → Megatons TNT) and probability
- MOID Calculator - Proper orbital intersection distance using 72×72 point sampling
- 3D Orbit Visualization - Accurate Keplerian orbits with inclination, RAAN, and argument of perihelion
- Spectral Type Analysis - C/S/M/X/V composition types
- Comparison Table - Side-by-side asteroid data comparison
- Energy Conservation Chart - Real-time energy drift monitoring
- Onboarding Tutorial - 5-step interactive guide
- Glossary - 12 scientific terms explained
- "Did You Know" Facts - 10 asteroid fun facts
- Historical Impacts - Chicxulub, Tunguska, and more
- What-If Scenarios - Save/load simulation states
- Pinch-to-Zoom - 2-finger zoom gesture
- Swipe Camera - Horizontal swipe to change camera
- Bottom Sheet - Panel content for mobile screens
- Mobile Navigation - 3-button bottom nav bar
We use the Velocity Verlet symplectic integrator for energy conservation:
| Effect | Formula | Reference |
|---|---|---|
| J2 Oblateness | Vallado (2007) | |
| Solar Radiation Pressure | Montenbruck & Gill (2000) | |
| Yarkovsky Effect | Vokrouhlický et al. (2000) | |
| Jupiter Perturbation | N-body gravitational influence | Orbital mechanics |
| Mars Perturbation | N-body gravitational influence | Orbital mechanics |
| Moon Perturbation | N-body gravitational influence | Close Earth approaches |
G = 6.67430×10⁻¹¹ m³/(kg·s²) Gravitational constant
AU = 1.495978707×10¹¹ m Astronomical Unit
μ_Sun = 1.327124×10²⁰ m³/s² Sun's gravitational parameter
μ_Earth = 3.986004×10¹⁴ m³/s² Earth's gravitational parameter
μ_Moon = 4.904869×10¹² m³/s² Moon's gravitational parameter
J₂_Earth = 1.08263×10⁻³ Earth oblateness coefficient
R_Earth = 6.378137×10⁶ m Earth equatorial radius
P_SRP = 4.56×10⁻⁶ N/m² Solar radiation pressure (1 AU)
Kinetic energy is converted to Megatons TNT for threat classification:
| Energy Range | Classification | Example |
|---|---|---|
| < 1 kiloton | Harmless | Burns up |
| 1 kt - 1 MT | Local | Chelyabinsk (~500 kt) |
| 1 - 100 MT | Regional | Tunguska (~15 MT) |
| 100 MT - 1 GT | National | Large city destruction |
| 1 - 100 GT | Global | Nuclear winter |
| > 100 GT | Extinction | Chicxulub |
Reference: NASA CNEOS Torino Scale
# Clone repository
git clone https://github.com/SpaceEngineerSS/CosmoRisk.git
cd CosmoRisk
# Install dependencies
npm install
# Run in development mode
npm run tauri dev
# Build production executable
npm run tauri buildDownload the latest release from GitHub Releases.
When running the .exe for the first time, Windows SmartScreen may show a warning because the application is new and not yet widely distributed. This is normal for new software.
To run the application:
- Click "More info" on the warning dialog
- Click "Run anyway"
We take security seriously. You can verify the application is safe:
| Verification | Link |
|---|---|
| VirusTotal Scan | View Scan Results |
| Source Code | GitHub Repository |
| Publisher | Mehmet Gümüş |
Note: The exe is signed with a self-signed certificate. File properties will show "Mehmet Gümüş" as the publisher.
- Obtain NASA API Key: Get a free key from NASA API Portal
- Enter API Key: Paste in the left panel's "NASA API Key" field
- Fetch NEOs: Click "Fetch NEOs" to load real asteroid data
- Select Asteroid: Click on any asteroid to view details
- Apply Deflection: Use kinetic impactor (Δv) or ion beam controls
- Monitor Impact Prediction: Watch the "Impact Prediction" panel
| Key | Action |
|---|---|
Space |
Play/Pause |
R |
Reset simulation |
+/- |
Speed up/slow down |
1/2/3 |
Camera presets (Sun/Earth/Top) |
O |
Toggle orbit visibility |
G |
Toggle grid |
F |
Zoom to fit all asteroids |
T |
Toggle theme (dark/light) |
D |
Show random asteroid fact |
? |
Show shortcuts modal |
| Metric | Value |
|---|---|
| Max Asteroids | 10,000+ |
| LOD System | Distance-based Points/Mesh |
| Target FPS | 60 |
| Achieved FPS | 53-62 |
| Energy Drift | < 10⁻⁵ over 100 years |
- N-Body gravity simulation
- Velocity Verlet integrator
- NASA NeoWs API integration
- Kinetic impactor deflection
- Ion beam deflection
- Gravity tractor (backend)
- Yarkovsky thermal effect
- Jupiter/Mars perturbations
- Monte Carlo impact probability
- Post-processing (Bloom, SSAO, FXAA)
- Torino Scale & MOID analysis
- Tutorial & Glossary
- Theme toggle & settings persistence
- Mobile touch gestures
- Asteroid trails (fading)
- Comparison table
- Mobile bottom sheet
- Relativistic precession
- VR/AR support
- JPL Horizons integration
If you use CosmoRisk in your research, please cite:
@software{cosmorisk_2025,
author = {Mehmet Gümüş},
title = {CosmoRisk: High-Fidelity NEO Defense Simulator},
version = {2.0.1},
year = {2025},
url = {https://github.com/SpaceEngineerSS/CosmoRisk}
}This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project was developed by Mehmet Gümüş.
- 🌐 Website: spacegumus.com.tr
- 🐙 GitHub: @SpaceEngineerSS
- NASA Near-Earth Object Program
- Three.js community
- Tauri team
- Academic references: Vallado (2007), Montenbruck & Gill (2000), Vokrouhlický et al. (2000)
Last updated: 18.12.2025

