/ interactive_tutorials / duffing_islands
Sign in
interactive_tutorials / duffing_islands
duffing_islands / app / index.html
69 lines · 2.1 KBBlameHistoryRaw
1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>Duffing Islands</title>
7 <link rel="stylesheet" href="style.css">
8</head>
9<body>
10 <header>
11 <h1>Islands in a sea of chaos</h1>
12 <p class="eq">
13 <i>ẍ</i> + <i>δ</i><i>ẋ</i> ± (2π<i>f</i><sub>0</sub>)<sup>2</sup><i>x</i> + <i>α</i><i>x</i><sup>3</sup> = <i>F</i> cos <i>Ωt</i>
14 </p>
15 </header>
17 <div class="layout">
18 <aside class="panel">
19 <select id="preset" aria-label="Preset"></select>
21 <div id="sliders" class="sliders"></div>
23 <div class="sound">
24 <button id="sound" class="toggle" aria-pressed="false">♪ Sound off</button>
25 <label class="row">
26 <span>Rhythm</span>
27 <select id="rhythm">
28 <option value="natural" selected>Natural: ẋ crosses 0 upward</option>
29 <option value="steady">Steady: each drive period</option>
30 </select>
31 </label>
32 <label class="row">
33 <span>Scale</span>
34 <select id="scale"></select>
35 </label>
36 <div class="row">
37 <span>Key</span>
38 <div id="keys" class="keys" role="group" aria-label="Key"></div>
39 </div>
40 <label class="row">
41 <span>Tempo</span>
42 <input id="tempo" type="range" min="1" max="40" step="1" value="16">
43 <output id="tempo-out"></output>
44 </label>
45 <label class="row">
46 <span>Sustain</span>
47 <input id="sustain" type="range">
48 <output></output>
49 </label>
50 <label class="row">
51 <span>Volume</span>
52 <input id="volume" type="range" min="0" max="1" step="0.01" value="0.6">
53 <output></output>
54 </label>
55 </div>
57 <ul id="orbit-list" class="orbit-list"></ul>
58 <button id="clear" class="quiet">Clear orbits</button>
59 </aside>
61 <div class="plot-wrap">
62 <canvas id="plot"></canvas>
63 <p id="hint" class="hint">Click to add orbits · click a start ring to remove it</p>
64 </div>
65 </div>
67 <script type="module" src="main.js"></script>
68</body>
69</html>
↑↓ move↵openescclose