Prompt specification
Build or customize the Three.js 3D scene "Two seasons of synthetic observations" inside the active workspace.
Engineering Constraints:
1. Runtime & Orbit: Use Three.js r160 with OrbitControls (damping enabled) and ACESFilmicToneMapping.
2. Frame Timing: Drive all motion strictly with clock.getDelta() so animation speed is FPS-independent.
3. Viewport Hygiene: Handle window resize cleanly, cap DPR at Math.min(window.devicePixelRatio, 2), and dispose geometries/materials/renderer on unmount.
Scene Metadata:
Scene: Two seasons of synthetic observations
Category: Space & Earth · Style: Procedural Solid / Shader 3D
License: MIT · Reference: https://three3d.app/scene/two-seasons-of-synthetic-observations-x1270
Scene Description Prompt:
Please create one self-contained HTML file with Three.js from cdnjs showing weather variability and climate. Place two equal-length calendar grids beside their summary bars; show that individual days overlap even when the seasonal averages differ in the constructed data. Stylized solid forms.
Working Three.js Starter (two-seasons-of-synthetic-observations-x1270):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#173330" />
<title>Climate Lab — Weather Variability</title>
<style>
:root {
--ink: #173330;
--ink-soft: #48605b;
--paper: #f3f0e7;
--paper-light: #fbf9f2;
--sage: #dce2d9;
--line: #c8d0c6;
--cool: #3f8e86;
--warm: #df744b;
--shared: #e4ba50;
--deep: #173337;
--radius: 24px;
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
margin: 0;
color: var(--ink);
background: var(--paper);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
}
button,
a {
font: inherit;
}
a {
color: inherit;
text-decoration: none;
}
.site-header {
width: min(1440px, 100%);
height: 82px;
margin: 0 auto;
padding: 0 38px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid var(--line);
}
.brand {
display: flex;
align-items: center;
gap: 12px;
font-size: 13px;
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.brand-mark {
position: relative;
width: 27px;
height: 27px;
overflow: hidden;
border-radius: 50%;
background: var(--ink);
}
.brand-mark::before {
content: "";
position: absolute;
width: 14px;
height: 14px;
top: -2px;
right: -2px;
border-radius: 50%;
background: var(--warm);
}
.brand-mark::after {
content: "";
position: absolute;
width: 13px;
height: 13px;
bottom: -1px;
left: -1px;
border-radius: 50%;
background: var(--cool);
}
.header-nav {
display: flex;
align-items: center;
gap: 30px;
color: var(--ink-soft);
font-size: 13px;
font-weight: 650;
}
.header-nav a:hover {
color: var(--ink);
}
.dataset-pill {
padding: 9px 13px;
color: var(--ink);
border: 1px solid var(--line);
border-radius: 999px;
background: var(--paper-light);
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
}
main {
width: min(1440px, 100%);
margin: 0 auto;
padding: 0 38px;
}
.hero {
display: grid;
grid-template-columns: minmax(0, 1.02fr) minmax(460px, 0.98fr);
gap: clamp(38px, 5vw, 82px);
align-items: center;
padding: 72px 0 84px;
}
.eyebrow {
display: flex;
align-items: center;
gap: 10px;
margin: 0 0 25px;
color: var(--ink-soft);
font-size: 11px;
font-weight: 800;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.eyebrow::before {
content: "";
width: 34px;
height: 2px;
background: var(--warm);
}
h1 {
max-width: 740px;
margin: 0;
font-size: clamp(54px, 6.2vw, 88px);
line-height: 0.96;
letter-spacing: -0.065em;
font-weight: 780;
}
h1 em {
color: var(--warm);
font-family: Georgia, "Times New Roman", serif;
font-weight: 500;
letter-spacing: -0.055em;
}
.hero-copy {
max-width: 640px;
margin: 28px 0 0;
color: var(--ink-soft);
font-size: clamp(16px, 1.5vw, 19px);
line-height: 1.65;
}
.hero-stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
max-width: 650px;
margin-top: 38px;
}
.hero-stat {
min-height: 112px;
padding: 18px;
border: 1px solid var(--line);
border-radius: 16px;
background: rgba(251, 249, 242, 0.68);
}
.hero-stat strong {
display: block;
margin-bottom: 8px;
font-size: 28px;
line-height: 1;
letter-spacing: -0.04em;
}
.hero-stat span {
display: block;
color: var(--ink-soft);
font-size: 11px;
line-height: 1.45;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.scene-shell {
position: relative;
min-height: 500px;
overflow: hidden;
isolation: isolate;
border-radius: 30px;
background: var(--deep);
box-shadow: 0 24px 70px rgba(23, 51, 48, 0.18);
}
#climate-scene {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
cursor: grab;
touch-action: none;
}
#climate-scene:active {
cursor: grabbing;
}
.scene-top,
.scene-bottom,
.scene-reset {
position: absolute;
z-index: 2;
}
.scene-top {
top: 25px;
left: 27px;
right: 27px;
display: flex;
justify-content: space-between;
align-items: flex-start;
pointer-events: none;
color: #f6f1e7;
}
.scene-kicker {
display: block;
margin-bottom: 7px;
color: #9fb4af;
font-size: 9px;
font-weight: 800;
letter-spacing: 0.16em;
text-transform: uppercase;
}
.scene-title {
font-size: 14px;
font-weight: 720;
letter-spacing: -0.01em;
}
.scene-scale {
padding: 8px 10px;
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: 999px;
color: #b9cbc7;
font-size: 9px;
font-weight: 750;
letter-spacing: 0.09em;
text-transform: uppercase;
}
.scene-bottom {
left: 27px;
right: 27px;
bottom: 24px;
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 20px;
pointer-events: none;
}
.scene-legend {
display: flex;
flex-wrap: wrap;
gap: 14px;
color: #c4d1ce;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.scene-legend span {
display: inline-flex;
align-items: center;
gap: 7px;
}
.legend-swatch {
width: 9px;
height: 9px;
border-radius: 2px;
background: var(--cool);
}
.legend-swatch.warm {
background: var(--warm);
}
.legend-swatch.shared {
background: var(--shared);
}
.scene-help {
color: #819a95;
font-size: 9px;
font-weight: 700;
letter-spacing: 0.07em;
text-transform: uppercase;
}
.scene-reset {
right: 24px;
top: 72px;
padding: 7px 10px;
color: #b9cbc7;
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: 999px;
background: rgba(23, 51, 55, 0.75);
cursor: pointer;
font-size: 9px;
font-weight: 750;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.scene-reset:hover {
color: white;
border-color: rgba(255, 255, 255, 0.4);
}
.comparison {
padding: 82px 0 90px;
border-top: 1px solid var(--line);
background: var(--sage);
}
.comparison-inner {
width: min(1440px, 100%);
margin: 0 auto;
padding: 0 38px;
}
.section-heading {
display: flex;
align-items: end;
justify-content: space-between;
gap: 30px;
margin-bottom: 34px;
}
.section-heading h2 {
margin: 0;
font-size: clamp(36px, 4vw, 55px);
line-height: 1;
letter-spacing: -0.05em;
}
.section-heading p {
max-width: 510px;
margin: 0;
color: var(--ink-soft);
font-size: 14px;
line-height: 1.6;
}
.season-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 20px;
}
.season-card {
--season: var(--cool);
overflow: hidden;
border: 1px solid rgba(23, 51, 48, 0.13);
border-radius: var(--radius);
background: var(--paper-light);
box-shadow: 0 14px 35px rgba(23, 51, 48, 0.06);
}
.season-card.warm {
--season: var(--warm);
}
.season-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
padding: 22px 24px;
border-bottom: 1px solid var(--line);
}
.season-title {
display: flex;
align-items: center;
gap: 13px;
}
.season-index {
display: grid;
width: 34px;
height: 34px;
place-items: center;
color: var(--paper-light);
border-radius: 10px;
background: var(--season);
font-size: 12px;
font-weight: 850;
}
.season-header h3 {
margin: 0 0 3px;
font-size: 16px;
letter-spacing: -0.02em;
}
.season-header p {
margin: 0;
color: var(--ink-soft);
font-size: 10px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.season-mean {
text-align: right;
}
.season-mean strong {
display: block;
font-size: 23px;
line-height: 1;
letter-spacing: -0.04em;
}
.season-mean span {
display: block;
margin-top: 5px;
color: var(--ink-soft);
font-size: 9px;
font-weight: 800;
letter-spacing: 0.1em;
text-transform: uppercase;
}
.season-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) 190px;
gap: 24px;
padding: 25px;
}
.calendar-heading {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
color: var(--ink-soft);
font-size: 9px;
font-weight: 800;
letter-spacing: 0.09em;
text-transform: uppercase;
}
.weekdays,
.day-grid {
display: grid;
grid-template-columns: repeat(7, minmax(0, 1fr));
gap: 7px;
}
.weekdays {
margin-bottom: 8px;
color: #7c8e88;
text-align: center;
font-size: 8px;
font-weight: 850;
letter-spacing: 0.08em;
}
.day {
min-width: 0;
text-align: center;
}
.day-track {
position: relative;
height: 62px;
display: flex;
align-items: flex-end;
justify-content: center;
}
.day-track::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 1px;
background: var(--line);
}
.day-bar {
position: relative;
z-index: 1;
width: min(26px, 68%);
min-height: 9px;
border-radius: 5px 5px 1px 1px;
background: var(--season);
transition: height 500ms ease;
}
.day-bar.in-band {
box-shadow: inset 0 0 0 2px var(--shared);
}
.day-value {
position: absolute;
z-index: 2;
top: 0;
left: 50%;
transform: translateX(-50%);
color: var(--ink-soft);
font-size: 8px;
font-weight: 750;
}
.day-number {
display: block;
padding-top: 7px;
color: #6c807a;
font-size: 9px;
font-weight: 700;
}
.summary-panel {
padding-left: 22px;
border-left: 1px solid var(--line);
}
.summary-label {
margin: 0 0 16px;
color: var(--ink-soft);
font-size: 9px;
font-weight: 850;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.metric {
margin-bottom: 20px;
}
.metric-label {
display: flex;
justify-content: space-between;
gap: 10px;
margin-bottom: 8px;
font-size: 9px;
font-weight: 800;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.metric-label strong {
font-size: 10px;
}
.metric-track {
position: relative;
height: 7px;
overflow: visible;
border-radius: 999px;
background: #e1e4dc;
}
.metric-fill {
height: 100%;
border-radius: inherit;
background: var(--season);
}
.metric-fill.median {
opacity: 0.68;
}
.range-fill {
position: absolute;
top: 0;
height: 100%;
border-radius: inherit;
background: var(--season);
}
.shared-marker {
position: absolute;
z-index: 2;
top: -4px;
bottom: -4px;
width: 3px;
border-radius: 2px;
background: var(--shared);
}
.metric-note {
display: block;
margin-top: 8px;
color: #71847e;
font-size: 9px;
line-height: 1.4;
}
.overlap-count {
margin-top: 26px;
padding-top: 18px;
border-top: 1px solid var(--line);
}
.overlap-count strong {
display: block;
margin-bottom: 4px;
font-size: 26px;
line-height: 1;
letter-spacing: -0.04em;
}
.overlap-count span {
color: var(--ink-soft);
font-size: 9px;
font-weight: 800;
line-height: 1.4;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.calendar-legend {
display: flex;
align-items: center;
gap: 16px;
margin-top: 20px;
color: var(--ink-soft);
font-size: 9px;
font-weight: 750;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.calendar-legend span {
display: inline-flex;
align-items: center;
gap: 7px;
}
.calendar-key {
width: 10px;
height: 10px;
border-radius: 3px;
background: var(--cool);
}
.calendar-key.warm {
background: var(--warm);
}
.calendar-key.shared {
border: 2px solid var(--shared);
background: transparent;
}
.overlap-section {
padding: 90px 0;
}
.overlap-card {
display: grid;
grid-template-columns: 310px minmax(0, 1fr);
gap: 55px;
padding: 38px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--paper-light);
}
.overlap-copy h2 {
margin: 0 0 18px;
font-size: 38px;
line-height: 1.02;
letter-spacing: -0.045em;
}
.overlap-copy p {
margin: 0;
color: var(--ink-soft);
font-size: 13px;
line-height: 1.7;
}
.overlap-key {
display: flex;
flex-wrap: wrap;
gap: 16px;
margin-top: 25px;
color: var(--ink-soft);
font-size: 9px;
font-weight: 800;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.overlap-key span {
display: inline-flex;
align-items: center;
gap: 7px;
}
.dot-symbol {
width: 9px;
height: 9px;
border-radius: 50%;
background: var(--cool);
}
.dot-symbol.warm {
border-radius: 2px;
background: var(--warm);
}
.dot-symbol.band {
width: 16px;
height: 8px;
border-radius: 2px;
background: var(--shared);
}
.plot-shell {
min-width: 0;
padding-top: 10px;
}
.plot-topline {
display: flex;
justify-content: space-between;
gap: 20px;
margin-bottom: 23px;
color: var(--ink-soft);
font-size: 9px;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.plot-topline strong {
color: var(--ink);
font-size: 11px;
}
.dot-plot {
position: relative;
height: 190px;
margin: 0 8px 34px 36px;
border-left: 1px solid var(--line);
border-bottom: 1px solid var(--line);
background: #f4f2ea;
}
.plot-gridline {
position: absolute;
left: 0;
right: 0;
height: 1px;
background: #e1e4dc;
}
.plot-band {
position: absolute;
z-index: 0;
top: 0;
bottom: 0;
left: 45%;
width: 20%;
background: rgba(228, 186, 80, 0.28);
border-left: 1px dashed rgba(168, 126, 22, 0.42);
border-right: 1px dashed rgba(168, 126, 22, 0.42);
}
.mean-line {
position: absolute;
z-index: 1;
top: -5px;
bottom: -5px;
width: 2px;
opacity: 0.68;
}
.mean-line.cool {
background: var(--cool);
}
.mean-line.warm {
background: var(--warm);
}
.mean-line::after {
content: attr(data-label);
position: absolute;
top: -18px;
left: 50%;
transform: translateX(-50%);
color: currentColor;
font-size: 8px;
font-weight: 900;
letter-spacing: 0.06em;
}
.plot-dot {
position: absolute;
z-index: 3;
width: 9px;
height: 9px;
border: 1px solid rgba(255, 255, 255, 0.95);
transform: translate(-50%, 50%);
}
.plot-dot.cool {
border-radius: 50%;
background: var(--cool);
}
.plot-dot.warm {
border-radius: 2px;
background: var(--warm);
}
.plot-axis {
position: relative;
height: 28px;
margin: 0 8px 0 36px;
color: #71847e;
font-size: 8px;
font-weight: 750;
}
.axis-tick {
position: absolute;
transform: translateX(-50%);
white-space: nowrap;
}
.axis-tick:first-child {
transform: none;
}
.axis-tick:last-child {
transform: translateX(-100%);
}
.band-label {
position: absolute;
left: 45%;
width: 20%;
margin-top: 8px;
transform: translateX(-50%);
color: #856613;
text-align: center;
font-size: 8px;
font-weight: 850;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.site-footer {
width: min(1440px, 100%);
margin: 0 auto;
padding: 30px 38px 44px;
display: flex;
justify-content: space-between;
gap: 30px;
border-top: 1px solid var(--line);
color: var(--ink-soft);
font-size: 10px;
line-height: 1.6;
}
.site-footer strong {
color: var(--ink);
letter-spacing: 0.08em;
text-transform: uppercase;
}
@media (max-width: 1080px) {
.hero {
grid-template-columns: 1fr;
}
.scene-shell {
min-height: 480px;
}
.season-grid {
grid-template-columns: 1fr;
}
.overlap-card {
grid-template-columns: 1fr;
gap: 30px;
}
}
@media (max-width: 720px) {
.site-header {
height: 70px;
padding: 0 20px;
}
.header-nav a:not(.dataset-pill) {
display: none;
}
main {
padding: 0 20px;
}
.hero {
gap: 35px;
padding: 52px 0 62px;
}
h1 {
font-size: clamp(48px, 15vw, 68px);
}
.hero-stats {
grid-template-columns: 1fr;
}
.hero-stat {
min-height: auto;
}
.scene-shell {
min-height: 410px;
border-radius: 22px;
}
.scene-help {
display: none;
}
.comparison-inner {
padding: 0 20px;
}
.comparison {
padding: 62px 0;
}
.section-heading {
display: block;
}
.section-heading p {
margin-top: 16px;
}
.season-layout {
grid-template-columns: 1fr;
}
.summary-panel {
padding: 22px 0 0;
border-top: 1px solid var(--line);
border-left: 0;
}
.summary-panel-inner {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 18px;
}
.overlap-section {
padding: 65px 0;
}
.overlap-card {
padding: 25px;
}
.plot-shell {
overflow-x: auto;
}
.dot-plot,
.plot-axis {
min-width: 560px;
}
.site-footer {
padding-left: 20px;
padding-right: 20px;
flex-direction: column;
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
.day-bar {
transition: none;
}
}
</style>
</head>
<body>
<header class="site-header">
<div class="brand">
<span class="brand-mark" aria-hidden="true"></span>
Climate Lab
</div>
<nav class="header-nav" aria-label="Main navigation">
<a href="#comparison">Comparison</a>
<a href="#overlap">Overlap</a>
<a href="#method">Method</a>
<span class="dataset-pill">Constructed data</span>
</nav>
</header>
<main>
<section class="hero" aria-labelledby="hero-title">
<div class="hero-content">
<p class="eyebrow">Weather variability / climate signal</p>
<h1 id="hero-title">
Weather wanders.<br />
<em>Climate remembers.</em>
</h1>
<p class="hero-copy">
A constructed comparison of two equal 28-day windows. The seasonal
averages separate clearly—yet individual days still occupy the same
temperature band.
</p>
<div class="hero-stats" aria-live="polite">
<div class="hero-stat">
<strong id="mean-gap">—</strong>
<span>Difference between seasonal means</span>
</div>
<div class="hero-stat">
<strong id="overlap-total">—</strong>
<span>Individual readings inside shared band</span>
</div>
<div class="hero-stat">
<strong id="overlap-width">—</strong>
<span>Width of the shared temperature band</span>
</div>
</div>
</div>
<div class="scene-shell" id="scene-shell">
<canvas
id="climate-scene"
aria-label="Interactive three-dimensional model of two 28-day temperature distributions"
></canvas>
<div class="scene-top">
<div>
<span class="scene-kicker">Figure 01 / Solid climate model</span>
<span class="scene-title">Two distributions, one shared scale</span>
</div>
<span class="scene-scale">28 days each</span>
</div>
<button class="scene-reset" id="reset-view" type="button">
Reset view
</button>
<div class="scene-bottom">
<div class="scene-legend" aria-label="Scene legend">
<span><i class="legend-swatch"></i> Cool window</span>
<span><i class="legend-swatch warm"></i> Warm window</span>
<span><i class="legend-swatch shared"></i> Shared band</span>
</div>
<span class="scene-help">Drag to orbit · scroll to zoom</span>
</div>
</div>
</section>
<section class="comparison" id="comparison">
<div class="comparison-inner">
<div class="section-heading">
<h2>Two seasons. Same length.</h2>
<p>
Each calendar contains 28 consecutive days. Bar height is the daily
maximum temperature; the gold outline marks values in the shared
18–22°C interval.
</p>
</div>
<div class="season-grid">
<article class="season-card" id="cool-card">
<header class="season-header">
<div class="season-title">
<span class="season-index">A</span>
<div>
<h3>Cool season</h3>
<p>North field · day 01—28</p>
</div>
</div>
<div class="season-mean">
<strong id="cool-mean">—</strong>
<span>Seasonal mean</span>
</div>
</header>
<div class="season-layout">
<div class="calendar-wrap">
<div class="calendar-heading">
<span>Daily maximum</span>
<span>01—28</span>
</div>
<div class="weekdays" aria-hidden="true">
<span>Mon</span>
<span>Tue</span>
<span>Wed</span>
<span>Thu</span>
<span>Fri</span>
<span>Sat</span>
<span>Sun</span>
</div>
<div class="day-grid" id="cool-calendar"></div>
<div class="calendar-legend">
<span><i class="calendar-key"></i> Cool reading</span>
<span><i class="calendar-key shared"></i> Shared band</span>
</div>
</div>
<aside class="summary-panel" aria-label="Cool season summary">
<p class="summary-label">Summary</p>
<div class="summary-panel-inner" id="cool-summary"></div>
</aside>
</div>
</article>
<article class="season-card warm" id="warm-card">
<header class="season-header">
<div class="season-title">
<span class="season-index">B</span>
<div>
<h3>Warm season</h3>
<p>South field · day 01—28</p>
</div>
</div>
<div class="season-mean">
<strong id="warm-mean">—</strong>
<span>Seasonal mean</span>
</div>
</header>
<div class="season-layout">
<div class="calendar-wrap">
<div class="calendar-heading">
<span>Daily maximum</span>
<span>01—28</span>
</div>
<div class="weekdays" aria-hidden="true">
<span>Mon</span>
<span>Tue</span>
<span>Wed</span>
<span>Thu</span>
<span>Fri</span>
<span>Sat</span>
<span>Sun</span>
</div>
<div class="day-grid" id="warm-calendar"></div>
<div class="calendar-legend">
<span><i class="calendar-key warm"></i> Warm reading</span>
<span><i class="calendar-key shared"></i> Shared band</span>
</div>
</div>
<aside class="summary-panel" aria-label="Warm season summary">
<p class="summary-label">Summary</p>
<div class="summary-panel-inner" id="warm-summary"></div>
</aside>
</div>
</article>
</div>
</div>
</section>
<section class="overlap-section" id="overlap">
<article class="overlap-card">
<div class="overlap-copy">
<p class="eyebrow">Overlap check</p>
<h2>The averages separate. The days still overlap.</h2>
<p>
Every marker below is one individual day. Horizontal position is
temperature; vertical position follows the 28-day sequence. The
gold band contains values from both constructed seasons.
</p>
<div class="overlap-key">
<span><i class="dot-symbol"></i> Cool season</span>
<span><i class="dot-symbol warm"></i> Warm season</span>
<span><i class="dot-symbol band"></i> Shared band</span>
</div>
</div>
<div class="plot-shell">
<div class="plot-topline">
<span><strong>Individual daily maxima</strong> · 56 readings</span>
<span id="shared-reading-count">— readings overlap</span>
</div>
<div class="dot-plot" id="dot-plot" aria-label="Dot plot of individual daily temperatures">
<div class="plot-gridline" style="top: 25%"></div>
<div class="plot-gridline" style="top: 50%"></div>
<div class="plot-gridline" style="top: 75%"></div>
<div class="plot-band"></div>
<div class="mean-line cool" id="cool-mean-line"></div>
<div class="mean-line warm" id="warm-mean-line"></div>
</div>
<div class="plot-axis">
<span class="axis-tick" style="left: 0%">9°C</span>
<span class="axis-tick" style="left: 25%">14°C</span>
<span class="axis-tick" style="left: 45%">18°C</span>
<span class="axis-tick" style="left: 65%">22°C</span>
<span class="axis-tick" style="left: 100%">29°C</span>
<span class="band-label">Shared 18—22°C band</span>
</div>
</div>
</article>
</section>
</main>
<footer class="site-footer" id="method">
<div>
<strong>Method</strong><br />
Constructed daily maximum temperatures. Both windows contain exactly 28
days and use the same 9–29°C visual scale.
</div>
<div>
<strong>Interpretation</strong><br />
A climate signal describes a distribution, not a single event. Seasonal
averages can differ while many individual observations still overlap.
</div>
</footer>
<script type="module">
import * as THREE from "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js";
/*
Constructed data
----------------
Both arrays contain 28 daily maximum temperatures.
The shared interval is inclusive: 18°C through 22°C.
*/
const coolDays = [
12, 14, 13, 16, 18, 20, 22, 19,
17, 15, 13, 18, 21, 20, 16, 14,
12, 15, 19, 22, 21, 17, 14, 13,
16, 20, 19, 18
];
const warmDays = [
18, 19, 21, 23, 25, 27, 29, 26,
24, 22, 20, 23, 28, 27, 24, 21,
19, 22, 25, 29, 28, 24, 21, 20,
23, 27, 26, 25
];
const scaleMin = 9;
const scaleMax = 29;
const sharedMin = 18;
const sharedMax = 22;
const average = values =>
values.reduce((sum, value) => sum + value, 0) / values.length;
const median = values => {
const sorted = [...values].sort((a, b) => a - b);
const middle = Math.floor(sorted.length / 2);
return (sorted[middle - 1] + sorted[middle]) / 2;
};
const inSharedBand = value => value >= sharedMin && value <= sharedMax;
const scalePosition = value =>
((value - scaleMin) / (scaleMax - scaleMin)) * 100;
const coolMean = average(coolDays);
const warmMean = average(warmDays);
const coolMedian = median(coolDays);
const warmMedian = median(warmDays);
const coolOverlap = coolDays.filter(inSharedBand).length;
const warmOverlap = warmDays.filter(inSharedBand).length;
const totalOverlap = coolOverlap + warmOverlap;
document.getElementById("mean-gap").textContent =
`${Math.abs(warmMean - coolMean).toFixed(1)}°C`;
document.getElementById("overlap-total").textContent =
`${totalOverlap}/56`;
document.getElementById("overlap-width").textContent =
`${sharedMax - sharedMin}°C`;
document.getElementById("cool-mean").textContent =
`${coolMean.toFixed(1)}°C`;
document.getElementById("warm-mean").textContent =
`${warmMean.toFixed(1)}°C`;
document.getElementById("shared-reading-count").textContent =
`${totalOverlap} readings overlap`;
function buildCalendar(element, values) {
element.replaceChildren();
values.forEach((value, index) => {
const day = document.createElement("div");
day.className = "day";
const track = document.createElement("div");
track.className = "day-track";
track.title = `Day ${index + 1}: ${value}°C maximum`;
const valueLabel = document.createElement("span");
valueLabel.className = "day-value";
valueLabel.textContent = value;
const bar = document.createElement("div");
bar.className = `day-bar${inSharedBand(value) ? " in-band" : ""}`;
// Preserve an absolute shared scale between both calendars.
const barHeight = 12 + scalePosition(value) * 0.46;
bar.style.height = `${barHeight}px`;
const date = document.createElement("span");
date.className = "day-number";
date.textContent = String(index + 1).padStart(2, "0");
track.append(valueLabel, bar);
day.append(track, date);
element.append(day);
});
}
function buildSummary(element, values, mean, med) {
const minimum = Math.min(...values);
const maximum = Math.max(...values);
const meanWidth = scalePosition(mean);
const medianWidth = scalePosition(med);
const rangeLeft = scalePosition(minimum);
const rangeWidth = scalePosition(maximum) - rangeLeft;
const bandLeft = scalePosition(sharedMin);
const bandWidth = scalePosition(sharedMax) - bandLeft;
const overlapCount = values.filter(inSharedBand).length;
element.innerHTML = `
<div class="metric">
<div class="metric-label">
<span>Mean</span>
<strong>${mean.toFixed(1)}°</strong>
</div>
<div class="metric-track">
<div class="metric-fill" style="width:${meanWidth}%"></div>
</div>
</div>
<div class="metric">
<div class="metric-label">
<span>Median</span>
<strong>${med.toFixed(1)}°</strong>
</div>
<div class="metric-track">
<div class="metric-fill median" style="width:${medianWidth}%"></div>
</div>
</div>
<div class="metric">
<div class="metric-label">
<span>Daily range</span>
<strong>${minimum}—${maximum}°</strong>
</div>
<div class="metric-track">
<div
class="range-fill"
style="left:${rangeLeft}%;width:${rangeWidth}%"
></div>
<div
class="shared-marker"
style="left:calc(${bandLeft}% - 1px);width:calc(${bandWidth}% + 2px)"
title="Shared band: 18–22°C"
></div>
</div>
<span class="metric-note">Gold marker = shared band</span>
</div>
<div class="overlap-count">
<strong>${overlapCount}/28</strong>
<span>readings in shared band</span>
</div>
`;
}
buildCalendar(document.getElementById("cool-calendar"), coolDays);
buildCalendar(document.getElementById("warm-calendar"), warmDays);
buildSummary(
document.getElementById("cool-summary"),
coolDays,
coolMean,
coolMedian
);
buildSummary(
document.getElementById("warm-summary"),
warmDays,
warmMean,
warmMedian
);
const plot = document.getElementById("dot-plot");
const coolMeanLine = document.getElementById("cool-mean-line");
const warmMeanLine = document.getElementById("warm-mean-line");
coolMeanLine.style.left = `${scalePosition(coolMean)}%`;
coolMeanLine.style.color = "var(--cool)";
coolMeanLine.dataset.label = `A ${coolMean.toFixed(1)}°`;
warmMeanLine.style.left = `${scalePosition(warmMean)}%`;
warmMeanLine.style.color = "var(--warm)";
warmMeanLine.dataset.label = `B ${warmMean.toFixed(1)}°`;
function addPlotDots(values, className) {
values.forEach((value, index) => {
const dot = document.createElement("span");
dot.className = `plot-dot ${className}`;
dot.style.left = `${scalePosition(value)}%`;
dot.style.bottom = `${7 + (index / (values.length - 1)) * 82}%`;
dot.title = `${className === "cool" ? "Cool" : "Warm"} day ${index + 1}: ${value}°C`;
plot.append(dot);
});
}
addPlotDots(warmDays, "warm");
addPlotDots(coolDays, "cool");
/*
Three.js scene
--------------
All geometry, lighting, camera movement, and controls are implemented
with the Three.js core module only.
*/
const shell = document.getElementById("scene-shell");
const canvas = document.getElementById("climate-scene");
const resetButton = document.getElementById("reset-view");
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x173337);
scene.fog = new THREE.Fog(0x173337, 13, 25);
const camera = new THREE.PerspectiveCamera(
34,
1,
0.1,
100
);
const renderer = new THREE.WebGLRenderer({
canvas,
antialias: true,
powerPreference: "high-performance"
});
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
renderer.outputColorSpace = THREE.SRGBColorSpace;
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.15;
const hemisphere = new THREE.HemisphereLight(
0xe6f0e9,
0x203837,
2.1
);
scene.add(hemisphere);
const keyLight = new THREE.DirectionalLight(
0xfff1d3,
4.2
);
keyLight.position.set(5, 9, 7);
keyLight.castShadow = true;
keyLight.shadow.mapSize.set(1024, 1024);
keyLight.shadow.camera.left = -8;
keyLight.shadow.camera.right = 8;
keyLight.shadow.camera.top = 8;
keyLight.shadow.camera.bottom = -8;
scene.add(keyLight);
const fillLight = new THREE.DirectionalLight(
0x7ec6be,
1.4
);
fillLight.position.set(-7, 4, -5);
scene.add(fillLight);
const model = new THREE.Group();
scene.add(model);
const paperMaterial = new THREE.MeshStandardMaterial({
color: 0xf2edde,
roughness: 0.9,
metalness: 0
});
const coolMaterial = new THREE.MeshStandardMaterial({
color: 0x3f9188,
roughness: 0.82,
metalness: 0
});
const warmMaterial = new THREE.MeshStandardMaterial({
color: 0xe27850,
roughness: 0.82,
metalness: 0
});
const sharedMaterial = new THREE.MeshStandardMaterial({
color: 0xe4ba50,
roughness: 0.8,
metalness: 0
});
const pedestalMaterial = new THREE.MeshStandardMaterial({
color: 0x27494a,
roughness: 1,
metalness: 0
});
const pedestal = new THREE.Mesh(
new THREE.CylinderGeometry(5.8, 6.05, 0.34, 64),
pedestalMaterial
);
pedestal.position.y = -0.38;
pedestal.receiveShadow = true;
model.add(pedestal);
const pedestalRing = new THREE.Mesh(
new THREE.TorusGeometry(5.18, 0.025, 8, 96),
new THREE.MeshStandardMaterial({
color: 0x54706d,
roughness: 1
})
);
pedestalRing.rotation.x = Math.PI / 2;
pedestalRing.position.y = -0.2;
model.add(pedestalRing);
const blockGeometry = new THREE.BoxGeometry(0.34, 1, 0.34);
const platformGeometry = new THREE.BoxGeometry(4.05, 0.26, 3.02);
const markerGeometry = new THREE.BoxGeometry(0.055, 1, 0.055);
const markerHeadGeometry = new THREE.SphereGeometry(0.105, 16, 12);
function heightForTemperature(value) {
return 0.22 + scalePosition(value) * 0.0125;
}
function buildSeason(values, centerX, normalMaterial, markerSide) {
const seasonGroup = new THREE.Group();
seasonGroup.position.x = centerX;
const platform = new THREE.Mesh(
platformGeometry,
new THREE.MeshStandardMaterial({
color: 0x315452,
roughness: 0.95
})
);
platform.position.y = 0;
platform.receiveShadow = true;
seasonGroup.add(platform);
values.forEach((value, index) => {
const column = index % 7;
const row = Math.floor(index / 7);
const x = (column - 3) * 0.53;
const z = (row - 1.5) * 0.69;
const height = heightForTemperature(value);
const block = new THREE.Mesh(
blockGeometry,
inSharedBand(value) ? sharedMaterial : normalMaterial
);
block.scale.y = height;
block.position.set(x, 0.13 + height / 2, z);
block.castShadow = true;
block.receiveShadow = true;
seasonGroup.add(block);
});
const meanHeight = heightForTemperature(
centerX < 0 ? coolMean : warmMean
);
const meanMarker = new THREE.Mesh(
markerGeometry,
paperMaterial
);
meanMarker.scale.y = meanHeight;
meanMarker.position.set(markerSide * 1.82, 0.13 + meanHeight / 2, 1.37);
meanMarker.castShadow = true;
seasonGroup.add(meanMarker);
const markerHead = new THREE.Mesh(
markerHeadGeometry,
paperMaterial
);
markerHead.position.set(
markerSide * 1.82,
0.13 + meanHeight,
1.37
);
markerHead.castShadow = true;
seasonGroup.add(markerHead);
const markerFoot = new THREE.Mesh(
new THREE.CylinderGeometry(0.16, 0.16, 0.05, 24),
paperMaterial
);
markerFoot.position.set(markerSide * 1.82, 0.16, 1.37);
seasonGroup.add(markerFoot);
model.add(seasonGroup);
}
buildSeason(coolDays, -2.22, coolMaterial, -1);
buildSeason(warmDays, 2.22, warmMaterial, 1);
// A translucent solid slab marks the shared temperature interval.
const bandBottom = heightForTemperature(sharedMin);
const bandTop = heightForTemperature(sharedMax);
const bandHeight = bandTop - bandBottom;
const bandCenter = (bandTop + bandBottom) / 2;
const bandSlab = new THREE.Mesh(
new THREE.BoxGeometry(9.7, bandHeight, 3.5),
new THREE.MeshBasicMaterial({
color: 0xe4ba50,
transparent: true,
opacity: 0.055,
depthWrite: false
})
);
bandSlab.position.set(0, bandCenter, 0);
model.add(bandSlab);
const bandRailMaterial = new THREE.MeshBasicMaterial({
color: 0xe4ba50,
transparent: true,
opacity: 0.34
});
[bandBottom, bandTop].forEach(height => {
const rail = new THREE.Mesh(
new THREE.BoxGeometry(9.7, 0.018, 0.025),
bandRailMaterial
);
rail.position.set(0, height, 1.77);
model.add(rail);
});
// Solid cloud forms over the cool season.
const cloud = new THREE.Group();
const cloudParts = [
[-0.55, 0, 0, 0.38],
[-0.18, 0.18, 0.02, 0.49],
[0.28, 0.08, 0, 0.42],
[0.62, -0.03, 0.01, 0.31]
];
cloudParts.forEach(([x, y, z, radius]) => {
const puff = new THREE.Mesh(
new THREE.SphereGeometry(radius, 24, 18),
paperMaterial
);
puff.position.set(x, y, z);
puff.castShadow = true;
cloud.add(puff);
});
cloud.position.set(-2.25, 2.55, -1.2);
model.add(cloud);
// Solid sun over the warm season.
const sun = new THREE.Mesh(
new THREE.SphereGeometry(0.56, 32, 24),
warmMaterial
);
sun.position.set(2.22, 2.62, -1.2);
sun.castShadow = true;
model.add(sun);
const sunHalo = new THREE.Mesh(
new THREE.TorusGeometry(0.79, 0.035, 12, 64),
new THREE.MeshStandardMaterial({
color: 0xf0bd69,
roughness: 0.85
})
);
sunHalo.position.copy(sun.position);
sunHalo.rotation.x = Math.PI / 2.6;
model.add(sunHalo);
// Custom orbit controls implemented directly.
const target = new THREE.Vector3(0, 0.72, 0);
const defaultState = {
yaw: 0.58,
pitch: 0.53,
radius: 12.6
};
let yaw = defaultState.yaw;
let pitch = defaultState.pitch;
let radius = defaultState.radius;
let targetYaw = yaw;
let targetPitch = pitch;
let targetRadius = radius;
let dragging = false;
let pointerX = 0;
let pointerY = 0;
function updateCamera() {
camera.position.set(
target.x + radius * Math.sin(yaw) * Math.cos(pitch),
target.y + radius * Math.sin(pitch),
target.z + radius * Math.cos(yaw) * Math.cos(pitch)
);
camera.lookAt(target);
}
canvas.addEventListener("pointerdown", event => {
dragging = true;
pointerX = event.clientX;
pointerY = event.clientY;
canvas.setPointerCapture(event.pointerId);
});
canvas.addEventListener("pointermove", event => {
if (!dragging) return;
const deltaX = event.clientX - pointerX;
const deltaY = event.clientY - pointerY;
pointerX = event.clientX;
pointerY = event.clientY;
targetYaw -= deltaX * 0.006;
targetPitch = THREE.MathUtils.clamp(
targetPitch + deltaY * 0.005,
0.24,
1.08
);
});
function endDrag(event) {
dragging = false;
if (canvas.hasPointerCapture(event.pointerId)) {
canvas.releasePointerCapture(event.pointerId);
}
}
canvas.addEventListener("pointerup", endDrag);
canvas.addEventListener("pointercancel", endDrag);
canvas.addEventListener(
"wheel",
event => {
event.preventDefault();
targetRadius = THREE.MathUtils.clamp(
targetRadius + event.deltaY * 0.009,
8.7,
16.5
);
},
{ passive: false }
);
function resetView() {
targetYaw = defaultState.yaw;
targetPitch = defaultState.pitch;
targetRadius = defaultState.radius;
}
resetButton.addEventListener("click", resetView);
canvas.addEventListener("dblclick", resetView);
function resizeScene() {
const width = shell.clientWidth;
const height = shell.clientHeight;
renderer.setSize(width, height, false);
camera.aspect = width / height;
camera.updateProjectionMatrix();
}
const resizeObserver = new ResizeObserver(resizeScene);
resizeObserver.observe(shell);
resizeScene();
const reduceMotion = window.matchMedia(
"(prefers-reduced-motion: reduce)"
).matches;
function animate() {
const smoothing = reduceMotion ? 1 : 0.075;
yaw = THREE.MathUtils.lerp(yaw, targetYaw, smoothing);
pitch = THREE.MathUtils.lerp(pitch, targetPitch, smoothing);
radius = THREE.MathUtils.lerp(radius, targetRadius, smoothing);
updateCamera();
renderer.render(scene, camera);
requestAnimationFrame(animate);
}
updateCamera();
animate();
</script>
</body>
</html>
```