this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

UI tweaks: defaults, timescale readout, uncap wave display

- Rg default 50 → 20 Ω
- Show live timescale value in slider label
- Components panel shows all waves (no 6-wave cap)
- Expand wave styles from 6 to 10: add long-dash and dash-dot patterns

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

+22 -18
+4 -2
app.js
··· 19 19 Rg: document.getElementById("Rg"), 20 20 Z0: document.getElementById("Z0"), 21 21 RL: document.getElementById("RL"), 22 - secPerTau: document.getElementById("secPerTau"), 22 + secPerTau: document.getElementById("secPerTau"), 23 + secPerTauRead: document.getElementById("secPerTauRead"), 23 24 reflectTol: document.getElementById("reflectTol"), 24 25 tRead: document.getElementById("tRead"), 25 26 gLRead: document.getElementById("gLRead"), ··· 35 36 // All entries here correspond to user-adjustable controls. 36 37 const model = { 37 38 Vg: 5, 38 - Rg: 50, 39 + Rg: 20, 39 40 Z0: 50, 40 41 RL: 30, 41 42 secPerTau: 2.5, // animation speed: real seconds per τ_d ··· 105 106 const dyn = computeDynamicState(tNorm, bounce, model.riseTimeTau); 106 107 timeHorizon = Math.max(2.2, Math.min(16, bounce.tEnd + 0.4)); 107 108 109 + el.secPerTauRead.textContent = fmt(model.secPerTau, 1); 108 110 el.tRead.textContent = fmt(tNorm, 3); 109 111 el.gLRead.textContent = fmt(waves.gL, 3); 110 112 el.vsRead.textContent = `${fmt(dyn.VS, 3)} V`;
+16 -14
render.js
··· 290 290 const xOfZ = (z) => xPlot0 + z * plotW; 291 291 292 292 const launched = [...dyn.launchedWaves].sort((a, b) => a.n - b.n); 293 - const shownWaves = launched.slice(0, 6); // limit component panel to 6 curves 294 293 // Piecewise segments used for scale computation regardless of riseTimeTau 295 294 // (they represent the asymptotic / fully-settled values, a safe upper bound). 296 295 const sumSegs = totalSegmentsForWaves(launched); 297 296 298 297 // Shared vertical scale: symmetric, padded, fixed for the current parameter set. 299 - const maxAbsWave = Math.max(1e-6, ...shownWaves.map((wf) => Math.abs(wf.A))); 298 + const maxAbsWave = Math.max(1e-6, ...launched.map((wf) => Math.abs(wf.A))); 300 299 const maxAbsSum = Math.max(1e-6, sumSegs.reduce((m, s) => Math.max(m, Math.abs(s.V)), 0)); 301 300 const vScale = Math.max(maxAbsWave, maxAbsSum); 302 301 const vLo = -1.15 * vScale; ··· 355 354 const top1 = PLOT_PAD_T + panelH + PLOT_PANEL_GAP; 356 355 const bot1 = top1 + panelH; 357 356 const y1 = (V) => top1 + 4 + (vHi - V) / (vHi - vLo) * (panelH - 8); 358 - const truncated = launched.length > shownWaves.length; 359 - drawPanelFrame(top1, bot1, y1, truncated ? "Components (V1..V6 shown)" : "Components (all waves)"); 357 + drawPanelFrame(top1, bot1, y1, "Components (all waves)"); 360 358 361 359 const waveStyles = [ 362 - { color: theme.accent, dash: [] }, // solid blue 363 - { color: theme.accent2, dash: [] }, // solid pink 364 - { color: theme.accent, dash: [9, 6] }, // dashed blue 365 - { color: theme.accent2, dash: [9, 6] }, // dashed pink 366 - { color: theme.accent, dash: [2, 5] }, // dotted blue 367 - { color: theme.accent2, dash: [2, 5] }, // dotted pink 360 + { color: theme.accent, dash: [] }, // solid blue 361 + { color: theme.accent2, dash: [] }, // solid pink 362 + { color: theme.accent, dash: [9, 6] }, // dashed blue 363 + { color: theme.accent2, dash: [9, 6] }, // dashed pink 364 + { color: theme.accent, dash: [2, 5] }, // dotted blue 365 + { color: theme.accent2, dash: [2, 5] }, // dotted pink 366 + { color: theme.accent, dash: [16, 5] }, // long-dash blue 367 + { color: theme.accent2, dash: [16, 5] }, // long-dash pink 368 + { color: theme.accent, dash: [8, 4, 2, 4] }, // dash-dot blue 369 + { color: theme.accent2, dash: [8, 4, 2, 4] }, // dash-dot pink 368 370 ]; 369 371 370 - for (let i = 0; i < shownWaves.length; i++) { 371 - const wf = shownWaves[i]; 372 - const style = waveStyles[i]; 372 + for (let i = 0; i < launched.length; i++) { 373 + const wf = launched[i]; 374 + const style = waveStyles[i % waveStyles.length]; 373 375 ctx.setLineDash(style.dash); 374 376 if (smooth) { 375 377 drawSampledWave(ctx, xOfZ, y1, (z) => waveVoltageAt(wf, z, riseTimeTau), style.color, 2.0); ··· 378 380 } 379 381 ctx.setLineDash([]); 380 382 } 381 - drawFrontMarkers(top1, bot1, shownWaves.filter((wf) => wf.u < 1).map((wf) => wf.front)); 383 + drawFrontMarkers(top1, bot1, launched.filter((wf) => wf.u < 1).map((wf) => wf.front)); 382 384 383 385 // z-axis endpoint labels (below both panels) 384 386 ctx.fillStyle = theme.muted;
+2 -2
tline_viz.html
··· 24 24 <div class="top-layout"> 25 25 <div class="cfg-vert"> 26 26 <div class="cfg-row"><span>V<sub>g</sub> =</span><input id="Vg" type="number" step="0.1" value="5.0" /><span>V</span></div> 27 - <div class="cfg-row"><span>R<sub>g</sub> =</span><input id="Rg" type="number" step="0.1" value="50.0" /><span>(Ω)</span></div> 27 + <div class="cfg-row"><span>R<sub>g</sub> =</span><input id="Rg" type="number" step="0.1" value="20.0" /><span>(Ω)</span></div> 28 28 <div class="cfg-row"><span>Z<sub>0</sub> =</span><input id="Z0" type="number" step="0.1" value="50.0" /><span>(Ω)</span></div> 29 29 <div class="cfg-row"><span>R<sub>L</sub> =</span><input id="RL" type="number" step="0.1" value="30.0" /><span>(Ω)</span></div> 30 30 <div class="cfg-extra"> 31 - <label>Time scale — seconds per τ<sub>d</sub> 31 + <label>Time scale — <span id="secPerTauRead" class="mono">2.5</span> s per τ<sub>d</sub> 32 32 <input id="secPerTau" type="range" min="0.5" max="6" step="0.1" value="2.5" /> 33 33 </label> 34 34 <label>Reflection termination tolerance (% of |V<sub>1</sub>|)