分享图
动画工坊
引擎就绪
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>分层少耕复合开沟机构原理动画</title>
  <style>
    :root {
      --bg: #0b0f17;
      --card-bg: rgba(18, 26, 38, 0.72);
      --card-border: rgba(56, 189, 248, 0.18);
      --accent-cyan: #38bdf8;
      --accent-amber: #f59e0b;
      --accent-green: #10b981;
      --accent-rose: #f43f5e;
      --text-dim: #94a3b8;
      --text-bright: #f8fafc;
      --soil-surface: #423428;
      --soil-hardpan: #2d241c;
      --soil-deep: #1a1510;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
    }

    body {
      background-color: var(--bg);
      color: var(--text-bright);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      padding: 12px;
    }

    /* 核心外层视窗容器 */
    .stage-container {
      position: relative;
      width: 100%;
      max-width: 1180px;
      height: 640px;
      background: radial-gradient(circle at 50% 20%, #151d2a 0%, #080c12 100%);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    /* 主SVG画面 */
    svg.viewport {
      width: 100%;
      height: 100%;
      display: block;
    }

    /* 极简角落微型 HUD 面板:严格控制字号与尺寸,绝不遮挡中央 */
    .hud-panel {
      position: absolute;
      background: var(--card-bg);
      backdrop-filter: blur(8px);
      border: 1px solid var(--card-border);
      border-radius: 6px;
      padding: 6px 10px;
      pointer-events: none;
      z-index: 20;
    }

    .hud-top-left {
      top: 14px;
      left: 14px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .hud-top-right {
      top: 14px;
      right: 14px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 11px;
    }

    .hud-bottom-left {
      bottom: 14px;
      left: 14px;
      font-size: 11px;
      max-width: 280px;
      line-height: 1.4;
    }

    .hud-bottom-right {
      bottom: 14px;
      right: 14px;
      pointer-events: auto;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .hud-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--accent-cyan);
      letter-spacing: 0.5px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .hud-title::before {
      content: "";
      width: 6px;
      height: 6px;
      background: var(--accent-cyan);
      border-radius: 50%;
      box-shadow: 0 0 8px var(--accent-cyan);
    }

    .metric-row {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      color: var(--text-dim);
    }

    .metric-val {
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-weight: 600;
      color: var(--accent-amber);
    }

    .metric-val.green {
      color: var(--accent-green);
    }

    /* 控制微件按钮 */
    .ctrl-btn {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: var(--text-bright);
      padding: 4px 10px;
      border-radius: 4px;
      font-size: 11px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      transition: all 0.2s ease;
    }

    .ctrl-btn:hover {
      background: rgba(56, 189, 248, 0.2);
      border-color: var(--accent-cyan);
      color: var(--accent-cyan);
    }

    /* 动画关键帧与流光效果 */
    @keyframes pulseGlow {
      0%, 100% { opacity: 0.25; filter: drop-shadow(0 0 2px var(--accent-amber)); }
      50% { opacity: 0.75; filter: drop-shadow(0 0 7px var(--accent-amber)); }
    }

    @keyframes rotateClockwise {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    .rotating {
      transform-box: fill-box;
      transform-origin: center;
      animation: rotateClockwise 2.4s linear infinite;
    }

    .rotating-fast {
      transform-box: fill-box;
      transform-origin: center;
      animation: rotateClockwise 1.6s linear infinite;
    }

    .stress-pulse {
      animation: pulseGlow 1.8s ease-in-out infinite;
    }
  </style>
</head>
<body>

  <div class="stage-container">
    <!-- 主工作区SVG图元 -->
    <svg class="viewport" viewBox="0 0 1100 600" preserveAspectRatio="xMidYMid meet">
      <defs>
        <!-- 背景与土层渐变 -->
        <linearGradient id="skyGrad" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stop-color="#0e1726" />
          <stop offset="100%" stop-color="#141f30" />
        </linearGradient>

        <linearGradient id="topsoilGrad" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stop-color="#3b2b1d" />
          <stop offset="100%" stop-color="#2a1e14" />
        </linearGradient>

        <linearGradient id="hardpanGrad" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stop-color="#251a10" />
          <stop offset="100%" stop-color="#19110a" />
        </linearGradient>

        <!-- 刀具金属材质渐变 -->
        <linearGradient id="metalDark" x1="0" y1="0" x2="1" y2="1">
          <stop offset="0%" stop-color="#475569" />
          <stop offset="50%" stop-color="#334155" />
          <stop offset="100%" stop-color="#1e293b" />
        </linearGradient>

        <linearGradient id="bladeEdge" x1="0" y1="0" x2="1" y2="0">
          <stop offset="0%" stop-color="#94a3b8" />
          <stop offset="50%" stop-color="#f8fafc" />
          <stop offset="100%" stop-color="#64748b" />
        </linearGradient>

        <!-- 破土能量波晕 -->
        <radialGradient id="shatterWave" cx="50%" cy="50%" r="50%">
          <stop offset="0%" stop-color="rgba(245, 158, 11, 0.45)" />
          <stop offset="65%" stop-color="rgba(245, 158, 11, 0.15)" />
          <stop offset="100%" stop-color="rgba(245, 158, 11, 0)" />
        </radialGradient>

        <!-- 滤镜:辉光 -->
        <filter id="glowEffect" x="-20%" y="-20%" width="140%" height="140%">
          <feGaussianBlur stdDeviation="3" result="blur" />
          <feComposite in="SourceGraphic" in2="blur" operator="over" />
        </filter>

        <!-- 图案:紧实犁底层杂色网点 -->
        <pattern id="compactPattern" width="16" height="16" patternUnits="userSpaceOnUse">
          <line x1="0" y1="0" x2="16" y2="16" stroke="rgba(255,255,255,0.03)" stroke-width="1"/>
          <circle cx="4" cy="12" r="0.8" fill="rgba(255,255,255,0.06)"/>
          <circle cx="12" cy="4" r="0.8" fill="rgba(255,255,255,0.06)"/>
        </pattern>
      </defs>

      <!-- 1. 天空与大气作业基准面 -->
      <rect x="0" y="0" width="1100" height="280" fill="url(#skyGrad)" />
      
      <!-- 地表线 (Y = 280) 与标尺网格 -->
      <g stroke="rgba(255, 255, 255, 0.08)" stroke-dasharray="4 4" stroke-width="1">
        <line x1="0" y1="360" x2="1100" y2="360" /> <!-- -160mm 浅圆盘开沟底 -->
        <line x1="0" y1="430" x2="1100" y2="430" /> <!-- -300mm 深松底界 -->
      </g>

      <!-- 2. 地下各土层结构体 -->
      <!-- 耕作浅土层 (0~160mm) -->
      <rect x="0" y="280" width="1100" height="80" fill="url(#topsoilGrad)" />
      <!-- 犁底层/紧实层 (160~300mm, 待破除矛盾区) -->
      <rect x="0" y="360" width="1100" height="70" fill="url(#hardpanGrad)" />
      <rect x="0" y="360" width="1100" height="70" fill="url(#compactPattern)" />
      <!-- 深部基底底土 (>300mm) -->
      <rect x="0" y="430" width="1100" height="170" fill="#140d07" />

      <!-- 土层分界指示刻度线(紧凑、细线边缘展示) -->
      <g font-size="10" fill="rgba(255, 255, 255, 0.35)" font-family="monospace">
        <text x="20" y="275">0mm (地表面)</text>
        <line x1="16" y1="280" x2="90" y2="280" stroke="rgba(255,255,255,0.2)" />

        <text x="20" y="356">-160mm (双圆盘窄V深)</text>
        <line x1="16" y1="360" x2="120" y2="360" stroke="rgba(56,189,248,0.4)" stroke-width="1.2" />

        <text x="20" y="426">-300mm (翼形深松挤压深)</text>
        <line x1="16" y1="430" x2="130" y2="430" stroke="rgba(245,158,11,0.5)" stroke-width="1.2" />
      </g>

      <!-- 3. 动态连续流动的土壤破碎模拟层 (动态粒子流通道) -->
      <g id="dynamicSoilStream"></g>

      <!-- 4. 挤压破土与应力微波场 (深松铲尖处 IFR 关键体现:不抛土,原位挤松) -->
      <g transform="translate(685, 430)">
        <ellipse cx="0" cy="0" rx="65" ry="32" fill="url(#shatterWave)" class="stress-pulse" />
        <!-- 碎裂微裂纹网络动画 -->
        <path d="M-10,0 L-40,8 M-20,-5 L-55,-12 M-5,8 L-30,22 M10,-6 L35,-15 M0,10 L15,25" 
              stroke="#fbbf24" stroke-width="1.5" stroke-linecap="round" opacity="0.75" />
      </g>

      <!-- 5. 机械总成系统 (自右向左前行:机架、限深轮、深松铲、双圆盘、施肥播种管、镇压轮) -->
      
      <!-- 主横梁机架 (钢构桁架) -->
      <g id="chassisBeam" stroke="#1e293b" stroke-width="2">
        <rect x="230" y="200" width="600" height="24" rx="3" fill="url(#metalDark)" />
        <rect x="235" y="204" width="590" height="5" fill="#64748b" opacity="0.4" />
        <!-- 悬挂节点刻度点 -->
        <circle cx="280" cy="212" r="4" fill="#0ea5e9" />
        <circle cx="480" cy="212" r="4" fill="#0ea5e9" />
        <circle cx="680" cy="212" r="4" fill="#0ea5e9" />
        <circle cx="790" cy="212" r="4" fill="#0ea5e9" />
      </g>

      <!-- A. 前置限深轮 (Front Depth Control Wheel, X≈790) -->
      <g id="depthWheelAssembly" transform="translate(790, 212)">
        <!-- 调节滑柱 -->
        <path d="M0,0 L0,48" stroke="#64748b" stroke-width="10" stroke-linecap="round" />
        <!-- 轮轴臂 -->
        <path d="M0,48 L15,68" stroke="#334155" stroke-width="8" stroke-linecap="round" />
        <!-- 轮体 (R=40, 直径约400mm等比缩放) -->
        <g transform="translate(15, 68)">
          <g class="rotating">
            <circle cx="0" cy="0" r="38" fill="#1e293b" stroke="#475569" stroke-width="6" />
            <circle cx="0" cy="0" r="28" fill="none" stroke="#64748b" stroke-width="1.5" stroke-dasharray="8 6" />
            <line x1="-34" y1="0" x2="34" y2="0" stroke="#94a3b8" stroke-width="2" />
            <line x1="0" y1="-34" x2="0" y2="34" stroke="#94a3b8" stroke-width="2" />
            <circle cx="0" cy="0" r="7" fill="#0ea5e9" />
          </g>
        </g>
      </g>

      <!-- B. 翼形深松铲 (Subsoiler: 深入-300mm,入土角23°,挤松沟底不翻土,X≈680) -->
      <g id="subsoilerAssembly" transform="translate(680, 212)">
        <!-- 安全销与高强度立柱柄 -->
        <path d="M0,0 L-5,70 L12,185 L5,218" fill="none" stroke="url(#metalDark)" stroke-width="16" stroke-linejoin="round" />
        <!-- 铲柄前缘高亮切削耐磨刃 -->
        <path d="M-8,50 L9,185 L3,218" fill="none" stroke="url(#bladeEdge)" stroke-width="3" />
        
        <!-- 安全剪切螺栓特写标记 -->
        <circle cx="-1" cy="55" r="4.5" fill="#f43f5e" />
        <circle cx="-1" cy="55" r="2" fill="#fff" />
        
        <!-- 23°入土角翼板切削铲尖 -->
        <g transform="translate(5, 218)">
          <!-- 窄翼扩力面 (翼展150mm侧影) -->
          <polygon points="-32,-14 18,-6 28,3 -15,5" fill="#f59e0b" opacity="0.9" filter="url(#glowEffect)" />
          <!-- 核心耐磨突笋与挤压头 -->
          <polygon points="18,-6 32,2 10,7 -4,5" fill="#fbbf24" />
          <line x1="-28" y1="-8" x2="22" y2="0" stroke="#ffffff" stroke-width="1.5" />
        </g>
      </g>

      <!-- C. 12°夹角双圆盘开沟器 (Double Disc Opener: 深入-160mm切出窄V沟,X≈480) -->
      <g id="discOpenerAssembly" transform="translate(480, 212)">
        <!-- 纵向导轨支承与下压弹簧 -->
        <rect x="-6" y="0" width="12" height="60" fill="#334155" rx="2" />
        <!-- 减震复位弹簧螺旋 -->
        <path d="M-5,16 Q5,21 -5,26 Q5,31 -5,36 Q5,41 0,46" fill="none" stroke="#94a3b8" stroke-width="3.5" />
        
        <!-- 双圆盘倾角重叠轮廓 (400mm直径对应 R≈38) -->
        <g transform="translate(0, 95)">
          <!-- 后盘阴影透视 -->
          <ellipse cx="6" cy="5" rx="36" ry="38" fill="#1e293b" stroke="#475569" stroke-width="3" opacity="0.8" />
          
          <!-- 前开沟圆盘 (带微夹角侧向镜面切削) -->
          <g class="rotating-fast">
            <circle cx="0" cy="0" r="37" fill="url(#metalDark)" stroke="#64748b" stroke-width="4" />
            <!-- 圆盘轻量化孔与旋转视标 -->
            <circle cx="0" cy="0" r="24" fill="none" stroke="rgba(255,255,255,0.2)" stroke-dasharray="16 12" />
            <circle cx="16" cy="0" r="4" fill="#38bdf8" />
            <circle cx="-16" cy="0" r="4" fill="#38bdf8" />
            <circle cx="0" cy="16" r="4" fill="#38bdf8" />
            <circle cx="0" cy="-16" r="4" fill="#38bdf8" />
            <!-- 锋利刃口圈 -->
            <circle cx="0" cy="0" r="36" fill="none" stroke="#e2e8f0" stroke-width="1.8" />
          </g>
          <!-- 盘毂中心轴承座 -->
          <circle cx="0" cy="0" r="8" fill="#0f172a" stroke="#38bdf8" stroke-width="2" />
        </g>
      </g>

      <!-- D. 侧位深施肥管 + 播种导落管 (Seed & Fertilizer Tube, X≈425) -->
      <g id="seedTubeAssembly" transform="translate(425, 195)">
        <!-- 透明种子管道 -->
        <path d="M0,0 C-10,40 -15,90 -12,160" fill="none" stroke="rgba(56, 189, 248, 0.4)" stroke-width="8" stroke-linecap="round" />
        <path d="M0,0 C-10,40 -15,90 -12,160" fill="none" stroke="#38bdf8" stroke-width="2" stroke-dasharray="4 6" />
        <!-- 落种引导嘴口,直抵疏松沟底上方 -->
        <polygon points="-16,155 -7,155 -10,165" fill="#38bdf8" />

        <!-- 侧位肥管 (较深层) -->
        <path d="M12,0 C5,45 8,110 10,175" fill="none" stroke="#10b981" stroke-width="3" stroke-dasharray="3 3" opacity="0.8" />
      </g>

      <!-- E. 动态落种与养分胶囊颗粒 -->
      <g id="animatedSeedsGroup"></g>

      <!-- F. 覆土合墒圆盘与后置镇压轮 (Closing & Press Wheel, X≈270) -->
      <g id="pressWheelAssembly" transform="translate(270, 212)">
        <!-- 弹簧加压臂 -->
        <path d="M0,0 L-20,68" stroke="#334155" stroke-width="9" stroke-linecap="round" />
        <line x1="-12" y1="20" x2="-28" y2="40" stroke="#f59e0b" stroke-width="3" />
        
        <!-- 镇压轮实体 (微凸弧形橡胶镇压面) -->
        <g transform="translate(-20, 68)">
          <g class="rotating">
            <circle cx="0" cy="0" r="26" fill="#1e293b" stroke="#475569" stroke-width="8" />
            <circle cx="0" cy="0" r="18" fill="#0f172a" />
            <line x1="-18" y1="0" x2="18" y2="0" stroke="#64748b" stroke-width="2" />
            <line x1="0" y1="-18" x2="0" y2="18" stroke="#64748b" stroke-width="2" />
            <circle cx="0" cy="0" r="5" fill="#e2e8f0" />
          </g>
          <!-- 地表压实光影接触线 (平整种床形成) -->
          <ellipse cx="0" cy="26" rx="14" ry="2.5" fill="#10b981" opacity="0.6" />
        </g>
      </g>

      <!-- 6. 核心创新原理解析视觉标注标引线 (极细、低侵入感 HUD 连线) -->
      <g stroke="rgba(255, 255, 255, 0.45)" stroke-width="1" stroke-linecap="round">
        <!-- 错位距 350mm -->
        <line x1="480" y1="180" x2="680" y2="180" />
        <line x1="480" y1="175" x2="480" y2="185" />
        <line x1="680" y1="175" x2="680" y2="185" />
        <text x="548" y="174" fill="#94a3b8" font-size="10" font-family="monospace">纵向错位 350mm</text>

        <!-- 双圆盘窄V开沟指示 -->
        <polyline points="445,360 410,360 390,345" fill="none" stroke="#38bdf8" />
        <text x="325" y="342" fill="#38bdf8" font-size="11">窄V型开沟 (抛土极小)</text>

        <!-- 深松铲原位松动指示 -->
        <polyline points="720,430 760,430 780,445" fill="none" stroke="#f59e0b" />
        <text x="785" y="449" fill="#f59e0b" font-size="11">深松原位碎土 (消除犁底层)</text>

        <!-- 虚实并存种床指示 -->
        <polyline points="370,410 330,410 300,430" fill="none" stroke="#10b981" />
        <text x="210" y="434" fill="#10b981" font-size="11">上实下虚 · 蓄水促根种床</text>
      </g>

      <!-- 拖拉机前进方向动态箭头 (机具相对作业示意:向右前进) -->
      <g transform="translate(940, 240)">
        <text x="-10" y="-8" fill="#38bdf8" font-size="10" font-weight="600" letter-spacing="1">前进方向 (3~4 km/h)</text>
        <line x1="0" y1="6" x2="90" y2="6" stroke="#38bdf8" stroke-width="2.5" />
        <polygon points="90,1 100,6 90,11" fill="#38bdf8" />
      </g>
    </svg>

    <!-- 角落 HUD 面板 1:左上角状态监控 -->
    <div class="hud-panel hud-top-left">
      <div class="hud-title">分层少耕复合开沟系统</div>
      <span style="font-size: 11px; color: var(--accent-green); background: rgba(16,185,129,0.15); padding: 2px 6px; border-radius: 4px;">IFR 理想解运行中</span>
    </div>

    <!-- 角落 HUD 面板 2:右上角工程指标参数实时卡 -->
    <div class="hud-panel hud-top-right">
      <div class="metric-row">
        <span>深松破障深度:</span>
        <span class="metric-val">300 mm (角23°)</span>
      </div>
      <div class="metric-row">
        <span>圆盘窄沟深度:</span>
        <span class="metric-val">160 mm (夹角12°)</span>
      </div>
      <div class="metric-row">
        <span>沟底实测紧实度:</span>
        <span class="metric-val green" id="compactValue">580 kPa (&lt;800)</span>
      </div>
      <div class="metric-row">
        <span>整机作业阻力:</span>
        <span class="metric-val green" id="resVal">-34.2% (高减阻)</span>
      </div>
    </div>

    <!-- 角落 HUD 面板 3:左下角紧凑原理说明 (不遮挡核心动画) -->
    <div class="hud-panel hud-bottom-left">
      <div style="font-weight:600; color:#e2e8f0; margin-bottom:2px;">复合解耦机制</div>
      <span style="color:var(--text-dim);">深松铲只松不抛、阻力小;双圆盘只开窄V浅沟、抛土少。突破深种保墒与机具高耗、沟底板结的物理矛盾。</span>
    </div>

    <!-- 角落 HUD 面板 4:右下角极简交互控制 -->
    <div class="hud-panel hud-bottom-right">
      <button class="ctrl-btn" id="togglePlayBtn">
        <svg width="10" height="10" viewBox="0 0 24 24" fill="currentColor">
          <polygon points="5,3 19,12 5,21" id="playIconPoly"/>
        </svg>
        <span id="playBtnText">暂停</span>
      </button>
      <button class="ctrl-btn" id="speedToggleBtn">
        <span>速度: </span><span id="speedVal" style="color:var(--accent-cyan); font-weight:600;">1.0x</span>
      </button>
    </div>
  </div>

  <script>
    /**
     * 高性能土壤颗粒流与物理动作驱动器
     * 保证页面重新打开、iframe刷新后 100% 自动运行
     */
    (function () {
      let isPlaying = true;
      let simSpeed = 1.0;
      let frameCount = 0;

      // 元素引用
      const dynamicSoilStream = document.getElementById("dynamicSoilStream");
      const animatedSeedsGroup = document.getElementById("animatedSeedsGroup");
      const compactValue = document.getElementById("compactValue");
      const resVal = document.getElementById("resVal");
      const togglePlayBtn = document.getElementById("togglePlayBtn");
      const playBtnText = document.getElementById("playBtnText");
      const playIconPoly = document.getElementById("playIconPoly");
      const speedToggleBtn = document.getElementById("speedToggleBtn");
      const speedVal = document.getElementById("speedVal");

      // 土壤连续流动切片微粒池
      const soilParticles = [];
      const MAX_SOIL_PARTICLES = 130;

      // 种子粒子池
      const seeds = [];
      let seedDropTimer = 0;

      // 初始化土层粒子:在不同土层具有不同流动色泽与形变
      for (let i = 0; i < MAX_SOIL_PARTICLES; i++) {
        soilParticles.push({
          x: Math.random() * 1100,
          y: 285 + Math.random() * 190, // 285~475 土层剖面内
          size: 1.5 + Math.random() * 2.6,
          speed: 1.8 + Math.random() * 0.8,
          layer: 'normal'
        });
      }

      // 种子下落发射
      function spawnSeed() {
        seeds.push({
          x: 414,
          y: 195,
          vy: 2.2,
          vx: -0.6,
          radius: 3.5,
          color: '#fbbf24',
          alpha: 1.0,
          inPlowbed: false
        });
      }

      // 动画主循环
      function tick() {
        if (isPlaying) {
          frameCount++;

          // 1. 土壤颗粒流运动 (机具向右行进,土壤相对向左流动)
          renderSoilStream();

          // 2. 播种时序 (周期性落入已破除板结的松软沟底)
          seedDropTimer += simSpeed;
          if (seedDropTimer > 45) {
            spawnSeed();
            seedDropTimer = 0;
          }
          renderSeeds();

          // 3. 微动态数值闪烁(工程实感)
          if (frameCount % 30 === 0) {
            const randKPa = 570 + Math.floor(Math.sin(frameCount * 0.05) * 25);
            compactValue.textContent = `${randKPa} kPa (<800)`;
            const randRes = (-33.5 + Math.cos(frameCount * 0.08) * 1.5).toFixed(1);
            resVal.textContent = `${randRes}% (高减阻)`;
          }
        }
        requestAnimationFrame(tick);
      }

      // 渲染土层与疏松微孔
      function renderSoilStream() {
        let streamHTML = "";

        for (let i = 0; i < soilParticles.length; i++) {
          const p = soilParticles[i];
          p.x -= p.speed * simSpeed;

          // 穿过深松铲尖(X≈685, Y>360)时:受翼板挤压发生瞬时膨松扰动
          if (p.x > 660 && p.x < 700 && p.y > 360 && p.y < 435) {
            p.y += (Math.random() - 0.5) * 1.8;
          }

          // 穿过后部形成“虚实并存”松软区(680以左):粒子更松散分布
          if (p.x < 0) {
            p.x = 1100 + Math.random() * 30;
            p.y = 285 + Math.random() * 190;
          }

          // 根据深度赋色:浅土层棕黄,犁底层暗褐,松动后高亮孔隙
          let fill = "rgba(180, 140, 100, 0.35)";
          if (p.y > 360 && p.y < 430) {
            // 深松带
            fill = p.x < 685 ? "rgba(245, 158, 11, 0.6)" : "rgba(100, 75, 55, 0.4)";
          } else if (p.y >= 430) {
            fill = "rgba(70, 50, 35, 0.3)";
          }

          streamHTML += `<circle cx="${p.x.toFixed(1)}" cy="${p.y.toFixed(1)}" r="${p.size.toFixed(1)}" fill="${fill}"/>`;
        }

        dynamicSoilStream.innerHTML = streamHTML;
      }

      // 渲染种子动态流动
      function renderSeeds() {
        let seedsHTML = "";

        for (let i = seeds.length - 1; i >= 0; i--) {
          const s = seeds[i];
          if (!s.inPlowbed) {
            s.y += s.vy * simSpeed;
            s.x += s.vx * simSpeed;
            // 沿导管曲线行进直到沟底 (Y ≈ 360)
            if (s.y >= 360) {
              s.y = 360;
              s.inPlowbed = true;
            }
          } else {
            // 种子落于沟底并随土层后移,直到被镇压轮轻压覆土
            s.x -= 2.0 * simSpeed;
            if (s.x < 150) {
              s.alpha -= 0.02 * simSpeed;
            }
          }

          if (s.alpha <= 0 || s.x < 80) {
            seeds.splice(i, 1);
            continue;
          }

          seedsHTML += `
            <g transform="translate(${s.x.toFixed(1)}, ${s.y.toFixed(1)})" opacity="${s.alpha}">
              <ellipse cx="0" cy="0" rx="${s.radius}" ry="${s.radius * 0.7}" fill="${s.color}" stroke="#d97706" stroke-width="0.8"/>
              <circle cx="-1" cy="-1" r="1" fill="#fff" opacity="0.6"/>
            </g>
          `;
        }

        animatedSeedsGroup.innerHTML = seedsHTML;
      }

      // 控制:暂停/播放 (默认页面加载自动播放)
      togglePlayBtn.addEventListener("click", function () {
        isPlaying = !isPlaying;
        if (isPlaying) {
          playBtnText.textContent = "暂停";
          playIconPoly.setAttribute("points", "5,3 19,12 5,21");
          document.querySelectorAll(".rotating, .rotating-fast").forEach(el => {
            el.style.animationPlayState = "running";
          });
        } else {
          playBtnText.textContent = "播放";
          playIconPoly.setAttribute("points", "5,3 9,3 9,21 5,21 15,3 19,3 19,21 15,21");
          document.querySelectorAll(".rotating, .rotating-fast").forEach(el => {
            el.style.animationPlayState = "paused";
          });
        }
      });

      // 控制:调速 (0.5x -> 1.0x -> 1.8x)
      const speedSteps = [0.5, 1.0, 1.8];
      let speedIdx = 1;
      speedToggleBtn.addEventListener("click", function () {
        speedIdx = (speedIdx + 1) % speedSteps.length;
        simSpeed = speedSteps[speedIdx];
        speedVal.textContent = simSpeed.toFixed(1) + "x";

        const dur = (2.4 / simSpeed).toFixed(2) + "s";
        const durFast = (1.6 / simSpeed).toFixed(2) + "s";
        document.querySelectorAll(".rotating").forEach(el => el.style.animationDuration = dur);
        document.querySelectorAll(".rotating-fast").forEach(el => el.style.animationDuration = durFast);
      });

      // 启动并保证自动执行
      if (document.readyState === "loading") {
        document.addEventListener("DOMContentLoaded", () => tick());
      } else {
        tick();
      }
    })();
  </script>
</body>
</html>
积分规则:每轮对话扣10分