分享图
动画工坊
引擎就绪

这是一个展示“理想解”状态的 SVG 原理动画。它聚焦于通过反向串联和交叉换位实现电磁耦合的动态消除过程。

设计说明

  • 理想状态可视化:动画核心在于展示磁通路径。蓝色光流代表“梯度磁通”,汇聚至中心主气隙;红色光流代表“共模磁通”,它们在上下线圈之间形成本地闭合环路,从而在主气隙处实现相互抵消,展示了“共模磁通不进入主气隙”的理想物理机制。
  • 引线优化:通过双绞线的波形动画(正弦路径)直观展示了通过物理结构对称来抵消空间磁场的原理。
  • 交互与视觉:采用了极简深色工程风格,磁通流量以连续动态流线表现,无需交互,页面加载即自动运行。
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <style>
        :root {
            --bg-color: #0a0a0c;
            --line-color: #333;
            --gradient-flux: #00f2ff; /* 蓝色: 梯度磁通 */
            --common-flux: #ff007a;   /* 粉色: 共模抵消 */
            --coil-fill: #1a1a20;
            --coil-stroke: #555;
            --text-color: #888;
        }

        body, html {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            background-color: var(--bg-color);
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            font-family: 'Segoe UI', sans-serif;
        }

        #animation-container {
            width: 90vmin;
            height: 90vmin;
            max-width: 800px;
            max-height: 800px;
        }

        /* 动画关键帧 */
        @keyframes dash {
            to { stroke-dashoffset: -100; }
        }

        @keyframes pulse {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 1; }
        }

        .flux-path {
            fill: none;
            stroke-width: 2;
            stroke-dasharray: 5, 5;
            animation: dash 3s linear infinite;
        }

        .gradient-line { stroke: var(--gradient-flux); }
        .common-line { stroke: var(--common-flux); }

        .coil-rect {
            fill: var(--coil-fill);
            stroke: var(--coil-stroke);
            stroke-width: 2;
        }

        .label {
            font-size: 12px;
            fill: var(--text-color);
            pointer-events: none;
            text-anchor: middle;
        }

        .legend {
            font-size: 10px;
            fill: #555;
        }
    </style>
</head>
<body>

<div id="animation-container">
    <svg viewBox="0 0 600 600" width="100%" height="100%">
        <!-- 背景网格辅助线 -->
        <g opacity="0.1">
            <line x1="300" y1="0" x2="300" y2="600" stroke="white" />
            <line x1="0" y1="300" x2="600" y2="300" stroke="white" />
        </g>

        <!-- 左上线圈组 -->
        <rect class="coil-rect" x="100" y="100" width="100" height="100" rx="5" />
        <text x="150" y="155" class="label">左上</text>
        
        <!-- 左下线圈组 -->
        <rect class="coil-rect" x="100" y="400" width="100" height="100" rx="5" />
        <text x="150" y="455" class="label">左下</text>

        <!-- 右上线圈组 -->
        <rect class="coil-rect" x="400" y="100" width="100" height="100" rx="5" />
        <text x="450" y="155" class="label">右上</text>

        <!-- 右下线圈组 -->
        <rect class="coil-rect" x="400" y="400" width="100" height="100" rx="5" />
        <text x="450" y="455" class="label">右下</text>

        <!-- 引线: 双绞视觉展示 -->
        <path d="M 150 200 Q 140 250 150 300 Q 160 350 150 400" stroke="#444" stroke-width="3" fill="none" />
        <path d="M 150 200 Q 160 250 150 300 Q 140 350 150 400" stroke="#444" stroke-width="3" fill="none" />

        <!-- 动画磁通: 梯度磁通 (指向中心) -->
        <path class="flux-path gradient-line" d="M 200 150 L 300 150" />
        <path class="flux-path gradient-line" d="M 200 450 L 300 450" />
        <path class="flux-path gradient-line" d="M 400 150 L 300 150" />
        <path class="flux-path gradient-line" d="M 400 450 L 300 450" />

        <!-- 动画磁通: 共模抵消 (上下循环) -->
        <path class="flux-path common-line" d="M 150 200 A 50 50 0 0 1 150 400" />
        <path class="flux-path common-line" d="M 450 200 A 50 50 0 0 1 450 400" />

        <!-- 说明文字 (角落) -->
        <text x="10" y="20" class="legend" style="fill: var(--gradient-flux);">蓝色: 梯度磁通(有效)</text>
        <text x="10" y="35" class="legend" style="fill: var(--common-flux);">红色: 共模磁通(抵消)</text>
        <text x="450" y="580" class="legend">4象限梯度耦合解耦模型</text>
    </svg>
</div>

</body>
</html>
积分规则:每轮对话扣10分