Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orbitron 2k24 #38

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added NASA SpaceApps Noida 24.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# NASA Space Apps Challenge 2024 [Noida]

#### Team Name -
#### Problem Statement -
#### Team Name - Orbitron 2k24
#### Problem Statement - Create an Orrery app that displays near earth objects
#### Team Leader Email -

## A Brief of the Prototype:
What is your solution? and how it works.
This interactive web application provides a unique perspective of our solar system, showcasing the dynamic movements of planets, moons, and other celestial bodies. You can explore the orbits of planets, discover near-Earth objects, and delve into the intriguing world of space exploration.

## Code Execution Instruction:
*[If your solution is **not** application based, you can ignore this para]
*Set-up local host by executing the command python -m http.server 8000 from the project directory. Then open localhost:8000 in browser

*The Repository must contain your **Execution Plan PDF**.
160 changes: 160 additions & 0 deletions data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
export const planetData = [
{ name: "Mercury", semiMajorAxis: 2, eccentricity: 0.206, radius: 0.38/5, speed: 4.74/10, texture: "textures/mercury.jpg" },
{ name: "Venus", semiMajorAxis: 3, eccentricity: 0.007, radius: 0.95/5, speed: 3.50/10, texture: "textures/venus.jpg" },
{ name: "Earth", semiMajorAxis: 4.00, eccentricity: 0.017, radius: 1.00/5, speed: 2.98/10, texture: "textures/earth.jpg" },
{ name: "Mars", semiMajorAxis: 5.52, eccentricity: 0.094, radius: 0.53/5, speed: 2.41/10, texture: "textures/mars.jpg" },
{ name: "Jupiter", semiMajorAxis: 7.20, eccentricity: 0.049, radius: 10.9/20, speed: 1.31/10, texture: "textures/jupiter.jpg" },
{ name: "Saturn", semiMajorAxis: 8.58, eccentricity: 0.052, radius: 9.13/20, speed: 0.97/10, texture: "textures/saturn.jpg" },
{ name: "Uranus", semiMajorAxis: 9.22, eccentricity: 0.047, radius: 3.98/20, speed: 0.68/10, texture: "textures/uranus.jpg" },
{ name: "Neptune", semiMajorAxis: 11.05, eccentricity: 0.010, radius: 3.86/20, speed: 0.54/10, texture: "textures/neptune.jpg" },
];
export const constellations = [
{
name: "Orion",
stars: [
{ position: { x: 650.0, y: 100.0, z: -50.0 } }, // Betelgeuse (~642 light-years)
{ position: { x: 800.0, y: 50.0, z: -40.0 } }, // Rigel (~860 light-years)
{ position: { x: 620.0, y: 80.0, z: -30.0 } }, // Bellatrix (~240 light-years)
{ position: { x: 700.0, y: 10.0, z: -70.0 } }, // Saiph (~720 light-years)
{ position: { x: 600.0, y: 60.0, z: -20.0 } }, // Alnitak (~800 light-years)
{ position: { x: 580.0, y: 40.0, z: -25.0 } }, // Alnilam (~1340 light-years)
{ position: { x: 610.0, y: 20.0, z: -55.0 } } // Mintaka (~900 light-years)
]
},
{
name: "Ursa Major",
stars: [
{ position: { x: -80.0, y: 50.0, z: -20.0 } }, // Dubhe (~124 light-years)
{ position: { x: -78.0, y: 45.0, z: -15.0 } }, // Merak (~79 light-years)
{ position: { x: -76.0, y: 48.0, z: -25.0 } }, // Phecda (~84 light-years)
{ position: { x: -74.0, y: 55.0, z: -30.0 } }, // Megrez (~80 light-years)
{ position: { x: -72.0, y: 60.0, z: -35.0 } }, // Furud (~50 light-years)
{ position: { x: -70.0, y: 65.0, z: -40.0 } }, // Alioth (~81 light-years)
{ position: { x: -68.0, y: 70.0, z: -30.0 } }, // Mizar (~78 light-years)
{ position: { x: -66.0, y: 75.0, z: -35.0 } } // Alkaid (~101 light-years)
]
},
{
name: "Cassiopeia",
stars: [
{ position: { x: 300.0, y: 120.0, z: 180.0 } }, // Schedar (~230 light-years)
{ position: { x: 290.0, y: 115.0, z: 185.0 } }, // Caph (~55 light-years)
{ position: { x: 280.0, y: 110.0, z: 175.0 } }, // Tsih (~220 light-years)
{ position: { x: 270.0, y: 125.0, z: 190.0 } }, // Ruchbah (~100 light-years)
{ position: { x: 260.0, y: 110.0, z: 170.0 } } // La Superba (~200 light-years)
]
},
{
name: "Scorpius",
stars: [
{ position: { x: -100.0, y: -50.0, z: 30.0 } }, // Antares (~600 light-years)
{ position: { x: -110.0, y: -55.0, z: 25.0 } }, // Shaula (~700 light-years)
{ position: { x: -95.0, y: -48.0, z: 32.0 } }, // Lesath (~600 light-years)
{ position: { x: -90.0, y: -45.0, z: 35.0 } }, // Jabbah (~100 light-years)
{ position: { x: -85.0, y: -40.0, z: 40.0 } } // Kaus Australis (~150 light-years)
]
},
{
name: "Lyra",
stars: [
{ position: { x: 200.0, y: 90.0, z: 140.0 } }, // Vega (~25 light-years)
{ position: { x: 210.0, y: 85.0, z: 135.0 } }, // Sheliak (~235 light-years)
{ position: { x: 205.0, y: 80.0, z: 130.0 } }, // Sulafat (~90 light-years)
{ position: { x: 195.0, y: 83.0, z: 145.0 } } // Ault (~500 light-years)
]
},
{
name: "Taurus",
stars: [
{ position: { x: -50.0, y: 45.0, z: 120.0 } }, // Aldebaran (~65 light-years)
{ position: { x: -52.0, y: 40.0, z: 125.0 } }, // Elnath (~130 light-years)
{ position: { x: -48.0, y: 42.0, z: 118.0 } }, // Hyades (~150 light-years)
{ position: { x: -46.0, y: 38.0, z: 122.0 } } // Pleiades (~444 light-years)
]
},
{
name: "Andromeda",
stars: [
{ position: { x: 600.0, y: 50.0, z: 200.0 } }, // Alpheratz (~97 light-years)
{ position: { x: 610.0, y: 48.0, z: 205.0 } }, // Mirach (~197 light-years)
{ position: { x: 590.0, y: 45.0, z: 195.0 } } // Almas (~200 light-years)
]
},
{
name: "Cygnus",
stars: [
{ position: { x: -200.0, y: 70.0, z: 80.0 } }, // Deneb (~1,500 light-years)
{ position: { x: -210.0, y: 68.0, z: 85.0 } }, // Sadr (~1,500 light-years)
{ position: { x: -205.0, y: 65.0, z: 82.0 } } // Botein (~180 light-years)
]
},
{
name: "Gemini",
stars: [
{ position: { x: 80.0, y: 20.0, z: 60.0 } }, // Castor (~51 light-years)
{ position: { x: 82.0, y: 22.0, z: 65.0 } } // Pollux (~34 light-years)
]
},
{
name: "Leo",
stars: [
{ position: { x: -70.0, y: 60.0, z: 90.0 } }, // Regulus (~77 light-years)
{ position: { x: -72.0, y: 58.0, z: 92.0 } } // Denebola (~36 light-years)
]
},
{
name: "Virgo",
stars: [
{ position: { x: 50.0, y: -80.0, z: 100.0 } }, // Spica (~250 light-years)
{ position: { x: 52.0, y: -82.0, z: 105.0 } } // Porrima (~38 light-years)
]
},
{
name: "Aquila",
stars: [
{ position: { x: -100.0, y: 10.0, z: 200.0 } }, // Altair (~16 light-years)
{ position: { x: -105.0, y: 12.0, z: 205.0 } }, // Alshain (~53 light-years)
{ position: { x: -95.0, y: 8.0, z: 198.0 } } // Tarazed (~400 light-years)
]
},
{
name: "Capricornus",
stars: [
{ position: { x: 100.0, y: -40.0, z: 100.0 } }, // Deneb Algedi (~39 light-years)
{ position: { x: 105.0, y: -42.0, z: 102.0 } }, // Nashira (~139 light-years)
{ position: { x: 98.0, y: -38.0, z: 97.0 } } // Algedi (~64 light-years)
]
},
{
name: "Pleiades",
stars: [
{ position: { x: 50.0, y: 25.0, z: 60.0 } }, // Alcyone (~450 light-years)
{ position: { x: 52.0, y: 22.0, z: 62.0 } }, // Atlas (~270 light-years)
{ position: { x: 51.0, y: 23.0, z: 59.0 } } // Pleione (~400 light-years)
]
},
{
name: "Cassiopeia",
stars: [
{ position: { x: 350.0, y: 130.0, z: 200.0 } }, // Schedar (~230 light-years)
{ position: { x: 360.0, y: 125.0, z: 190.0 } }, // Caph (~55 light-years)
{ position: { x: 355.0, y: 120.0, z: 185.0 } } // Ruchbah (~100 light-years)
]
},
{
name: "Pisces",
stars: [
{ position: { x: -20.0, y: 70.0, z: 200.0 } }, // Alrescha (~139 light-years)
{ position: { x: -25.0, y: 75.0, z: 205.0 } }, // Fumalsamakah (~160 light-years)
{ position: { x: -15.0, y: 72.0, z: 198.0 } } // Biham (~300 light-years)
]
},
{
name: "Hercules",
stars: [
{ position: { x: 120.0, y: 90.0, z: 220.0 } }, // Vega (~25 light-years)
{ position: { x: 122.0, y: 85.0, z: 215.0 } }, // Zeta Herculis (~46 light-years)
{ position: { x: 118.0, y: 95.0, z: 225.0 } } // Epsilon Herculis (~250 light-years)
]
}
];
52 changes: 52 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Orrery Web App</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron&display=swap">
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/[email protected]/build/three.module.js",
"OrbitControls": "https://unpkg.com/[email protected]/examples/jsm/controls/OrbitControls.js",
"EffectComposer": "https://unpkg.com/[email protected]/examples/jsm/postprocessing/EffectComposer.js",
"RenderPass": "https://unpkg.com/[email protected]/examples/jsm/postprocessing/RenderPass.js",
"UnrealBloomPass": "https://unpkg.com/[email protected]/examples/jsm/postprocessing/UnrealBloomPass.js"
}
}
</script>
</head>
<body>
<div id="loading">
Loading...
<div id="progress-bar">
<div id="progress-fill">
</div>
</div>
</div>
<div id="scene-container"></div>
<div id="details"></div>
<div class="widget" id="left-widget">
<span class="material-icons">star</span>
</div>
<div class="widget" id="right-widget">
<span class="material-icons">settings</span>
</div>
<div id="controls">
<label for="speed">Speed:</label>
<input type="range" id="speed" min="0.01" max="0.1" step="0.01" value="0.01">
<button id="toggle-asteroids" class="material-button">
<span class="material-icons">visibility</span>
Asteroids
</button>
<button id="toggle-constellations" class="material-button">
<span class="material-icons">star</span>
Constellations
</button>
</div>
<script type="module" src="script.js"></script>
</body>
</html>
Loading