Write a beautiful web page in a single HTML file that shows a visualization of how exoplanets are discovered using the transmit method using data from TESS.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Here's a beautiful, self-contained HTML page that visualizes how exoplanets are discovered using the transit method with data from NASA's TESS (Transiting Exoplanet Survey Satellite):
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TESS Exoplanet Transit Visualization</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #0a0a1a;
color: #e0e0e0;
margin: 0;
padding: 0;
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
padding: 40px 0;
background: linear-gradient(135deg, #1a1a3a, #0a0a1a);
border-radius: 10px;
margin-bottom: 30px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}
h1 {
font-size: 2.5rem;
margin-bottom: 10px;
color: #4fc3f7;
text-shadow: 0 0 10px rgba(79, 195, 247, 0.3);
}
h2 {
color: #81d4fa;
margin-top: 30px;
}
.intro {
font-size: 1.1rem;
max-width: 800px;
margin: 0 auto 30px;
}
.visualization-container {
display: flex;
flex-direction: column;
gap: 40px;
margin-bottom: 50px;
}
.visualization {
background: #1a1a3a;
border-radius: 10px;
padding: 20px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.star-system {
display: flex;
justify-content: center;
align-items: center;
height: 300px;
position: relative;
margin-bottom: 30px;
}
.star {
width: 100px;
height: 100px;
background: radial-gradient(circle, #ffeb3b, #ff9800);
border-radius: 50%;
box-shadow: 0 0 30px #ff9800, 0 0 60px #ffeb3b;
position: relative;
z-index: 1;
}
.planet {
position: absolute;
border-radius: 50%;
background: #8bc34a;
box-shadow: 0 0 10px #8bc34a;
transition: transform 0.5s ease-in-out;
}
.light-curve {
height: 300px;
background: #1a1a3a;
border-radius: 10px;
position: relative;
}
.controls {
display: flex;
justify-content: center;
gap: 20px;
margin-bottom: 20px;
}
button {
background: #4a148c;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s;
}
button:hover {
background: #7b1fa2;
transform: translateY(-2px);
}
.info-panel {
background: rgba(26, 26, 58, 0.8);
border-radius: 10px;
padding: 20px;
margin-top: 20px;
border-left: 4px solid #4fc3f7;
}
.tess-facts {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
margin-top: 30px;
}
.fact-card {
background: #1a1a3a;
padding: 20px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
border-top: 3px solid #4fc3f7;
}
footer {
text-align: center;
margin-top: 50px;
padding: 20px;
color: #9e9e9e;
font-size: 0.9rem;
}
.tooltip {
position: absolute;
padding: 10px;
background: rgba(0, 0, 0, 0.8);
color: white;
border-radius: 5px;
pointer-events: none;
font-size: 14px;
z-index: 10;
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Exoplanet Transit Detection with TESS</h1>
<p class="intro">Visualizing how NASA's Transiting Exoplanet Survey Satellite discovers planets orbiting distant stars by detecting the subtle dimming of starlight when a planet passes in front.</p>
</header>
<div class="visualization-container">
<div class="visualization">
<h2>1. The Transit Method</h2>
<p>When an exoplanet passes in front of its host star from our perspective, it blocks a small fraction of the star's light. This periodic dimming reveals the planet's presence and provides information about its size and orbit.</p>
<div class="controls">
<button id="startAnimation">Start Animation</button>
<button id="resetAnimation">Reset</button>
</div>
<div class="star-system" id="starSystem">
<div class="star"></div>
<!-- Planet will be added by JavaScript -->
</div>
<div class="light-curve" id="lightCurve"></div>
<div class="info-panel">
<h3>What You're Seeing</h3>
<p>The animation shows a star with an orbiting exoplanet. As the planet transits (passes in front of) the star, the star's brightness decreases slightly. The light curve graph below records this change in brightness over time.</p>
</div>
</div>
<div class="visualization">
<h2>2. Real TESS Data Examples</h2>
<p>Below are light curves from actual exoplanet discoveries by TESS, showing the characteristic "dips" in brightness that reveal planetary transits.</p>
<div id="tessExamples"></div>
<div class="info-panel">
<h3>Understanding the Data</h3>
<p>TESS monitors over 200,000 stars simultaneously, measuring their brightness every 2 minutes (for selected stars) or every 30 minutes. The data is processed to identify periodic dips that may indicate transiting planets.</p>
</div>
</div>
</div>
<div class="tess-facts">
<div class="fact-card">
<h3>TESS Mission</h3>
<p>Launched in 2018, TESS is NASA's next-generation planet hunter, surveying 85% of the sky to search for planets around the brightest stars near Earth.</p>
</div>
<div class="fact-card">
<h3>Transit Detection</h3>
<p>A Jupiter-sized planet typically causes a 1% dip in brightness, while an Earth-sized planet causes only a 0.01% dip. TESS can detect changes as small as 0.05%.</p>
</div>
<div class="fact-card">
<h3>Discoveries</h3>
<p>As of 2023, TESS has discovered over 300 confirmed exoplanets and identified thousands of candidates awaiting confirmation.</p>
</div>
</div>
</div>
<footer>
<p>Visualization created with D3.js | Data from NASA TESS Mission | Not affiliated with NASA</p>
</footer>
<script>
// Animation variables
let animationInterval;
let time = 0;
let isAnimating = false;
// Sample TESS data (simplified for visualization)
const tessData = [
{
name: "TOI 700 d",
period: 37.4,
depth: 0.03,
duration: 0.1,
description: "Earth-sized planet in habitable zone"
},
{
name: "TOI 1338 b",
period: 95.2,