Spiral wave in a refractive gradient

by Chantal Roth

HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>GR (ESU): Spiral in a refractive-index gradient — Explained</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" async></script>
<style>
  html,body { margin:0; height:100%; background:#001014; color:#e6f2f0; font:14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
  
  /* --- Controls Bar --- */
  #controls {
    position: absolute; top: 8px; left: 8px; right: 8px; z-index: 20;
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center; 
    background: rgba(0,20,25,.8); padding: 8px 12px; border-radius: 8px; 
    backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.1);
  }
  .ctrl-group { display: flex; align-items: center; gap: 6px; }
  #controls label { white-space: nowrap; font-size: 12px; color: #8ab; }
  #controls input[type="range"]{ width: 80px; cursor: pointer; }
  .mini { font-variant-numeric: tabular-nums; opacity: .9; width: 30px; display:inline-block; text-align:right; }
  button { 
    cursor: pointer; background: #0f3036; color: #acf; border: 1px solid #246; 
    padding: 4px 10px; border-radius: 4px; font-size: 12px; transition: 0.2s;
  }
  button:hover { background: #1a454d; border-color: #48a; color: #fff; }
  
  #infoBtn { 
    background: #00bcd4; color: #000; font-weight: bold; border: none; 
    width: 24px; height: 24px; border-radius: 50%; padding: 0; 
    display:grid; place-items:center; margin-left: auto;
  }
  #infoBtn:hover { background: #fff; }

  /* --- Canvas --- */
  #canvas { position: absolute; inset: 0; display:block; }
  #overlay { position:absolute; inset:0; pointer-events:none; }

  /* --- Info Modal --- */
  #modalOverlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: none; place-items: center;
   ...