典型示例:用于解释机制,不代表某次测试的精确坐标。
```
CSS requirements:
- `svg { width: 100%; height: auto; }`,不再使用 `min-width` 和横向滚动容器;窄屏按 `viewBox` 等比缩放。
- 用同一组语义颜色稳定表达:灰色原始粗路径、蓝色窗口/约束、绿色已接受候选、琥珀色发布边界、红色拒绝或阻断;同时配合实线/虚线、文字和符号。
- `.scene-layer` 默认淡出,`[data-step="N"] .scene-N` 显示;`prefers-reduced-motion: reduce` 时禁用转场。
- 不设置固定视口高度、不设置内部滚动,并保证按钮触摸目标和焦点状态清晰。
- [ ] **Step 3: 用真实五次 Hermite 基函数绘制典型候选曲线**
In the page script, define the fixed example endpoints and use the six quintic Hermite basis functions—not an SVG cubic Bézier substitute—to sample the visual candidate:
```javascript
const hermite = {
p0: { x: 290, y: 462 }, p1: { x: 690, y: 258 },
d0: { x: 180, y: 0 }, d1: { x: 210, y: -135 },
a0: { x: 0, y: -18 }, a1: { x: 22, y: -12 }
};
function quinticBasis(t) {
const t2 = t * t, t3 = t2 * t, t4 = t3 * t, t5 = t4 * t;
return [
1 - 10 * t3 + 15 * t4 - 6 * t5,
t - 6 * t3 + 8 * t4 - 3 * t5,
0.5 * (t2 - 3 * t3 + 3 * t4 - t5),
10 * t3 - 15 * t4 + 6 * t5,
-4 * t3 + 7 * t4 - 3 * t5,
0.5 * (t3 - 2 * t4 + t5)
];
}
function buildQuinticPath() {
const points = [];
for (let i = 0; i <= 48; i += 1) {
const [h00, h10, h20, h01, h11, h21] = quinticBasis(i / 48);
points.push({
x: h00 * hermite.p0.x + h10 * hermite.d0.x + h20 * hermite.a0.x + h01 * hermite.p1.x + h11 * hermite.d1.x + h21 * hermite.a1.x,
y: h00 * hermite.p0.y + h10 * hermite.d0.y + h20 * hermite.a0.y + h01 * hermite.p1.y + h11 * hermite.d1.y + h21 * hermite.a1.y
});
}
return points.map((point, index) => `${index === 0 ? 'M' : 'L'} ${point.x.toFixed(1)} ${point.y.toFixed(1)}`).join(' ');
}
```
Set the generated string on `#quintic-candidate`. Draw a separate raw polyline that shares the same window endpoints but has a visible heading/curvature break in its interior. Add persistent labels for start, end, direction, window boundary and `κ` jump; do not attach real-world units or claim these fixed coordinates are measured data.
- [ ] **Step 4: 实现六个可读状态的 SVG 图层**
Create six SVG groups, each carrying both `scene-layer` and `scene-0` through `scene-5` as appropriate. They must communicate these exact visual effects:
```text
scene-0: 原始离散点、方向箭头、突变点,候选曲线隐藏。
scene-1: 左右窗口边界和淡蓝色局部带高亮,其余粗路径降低不透明度。
scene-2: 两端切向箭头、二阶趋势弧线、虚线 quintic-candidate 可见。
scene-3: 灰色原折线与绿色候选曲线叠加,接缝用“替换开始/结束”标记。
scene-4: 上方替换后路径;下方 κ—s 趋势示意显示原始跳变与候选连续过渡,并标“趋势示意,非实测数据”。
scene-5: 三个车辆轮廓沿候选曲线放置;净空带、通过标记和“碰撞 / 净空 / 曲率 / 偏移”四个质量门可见。
```
Use `