|
|
@@ -0,0 +1,1677 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ru">
|
|
|
+<head>
|
|
|
+<meta charset="UTF-8">
|
|
|
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+<title>Электромагнитный канал утечки информации</title>
|
|
|
+<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
|
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
|
+<link href="https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;700&family=PT+Serif:ital,wght@0,400;0,700;1,400&family=Roboto+Mono:wght@400;700&display=swap" rel="stylesheet">
|
|
|
+<style>
|
|
|
+ :root {
|
|
|
+ --paper: #f2e9d6;
|
|
|
+ --paper-dark: #e6dac2;
|
|
|
+ --ink: #1a2a4a;
|
|
|
+ --ink-light: #4a5a7a;
|
|
|
+ --red: #8b1a1a;
|
|
|
+ --red-light: #b84242;
|
|
|
+ --blue: #1a4a6a;
|
|
|
+ --blue-light: #3a7aa0;
|
|
|
+ --green: #2a5a2a;
|
|
|
+ --line: #c4b8a0;
|
|
|
+ }
|
|
|
+ * { box-sizing: border-box; }
|
|
|
+ html, body { margin: 0; padding: 0; }
|
|
|
+ body {
|
|
|
+ background:
|
|
|
+ repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(0,0,0,0.03) 24px),
|
|
|
+ var(--paper);
|
|
|
+ color: var(--ink);
|
|
|
+ font-family: 'PT Serif', Georgia, serif;
|
|
|
+ min-height: 100vh;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 20px;
|
|
|
+ line-height: 1.6;
|
|
|
+ }
|
|
|
+ .app {
|
|
|
+ width: 100%;
|
|
|
+ max-width: 900px;
|
|
|
+ background: var(--paper);
|
|
|
+ border: 2px solid var(--ink);
|
|
|
+ box-shadow: 6px 6px 0 rgba(26,42,74,0.15);
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .app::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ inset: 8px;
|
|
|
+ border: 1px solid var(--line);
|
|
|
+ pointer-events: none;
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Шапка */
|
|
|
+ .header {
|
|
|
+ padding: 20px 30px 15px;
|
|
|
+ border-bottom: 2px solid var(--ink);
|
|
|
+ position: relative;
|
|
|
+ z-index: 2;
|
|
|
+ }
|
|
|
+ .header-top {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: baseline;
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 11px;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ text-transform: uppercase;
|
|
|
+ color: var(--ink-light);
|
|
|
+ margin-bottom: 8px;
|
|
|
+ }
|
|
|
+ .header h1 {
|
|
|
+ font-family: 'Oswald', sans-serif;
|
|
|
+ font-weight: 700;
|
|
|
+ font-size: 28px;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ text-transform: uppercase;
|
|
|
+ margin: 0;
|
|
|
+ color: var(--ink);
|
|
|
+ }
|
|
|
+ .header .sub {
|
|
|
+ font-family: 'PT Serif', serif;
|
|
|
+ font-style: italic;
|
|
|
+ font-size: 14px;
|
|
|
+ color: var(--ink-light);
|
|
|
+ margin-top: 4px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Прогресс */
|
|
|
+ .progress {
|
|
|
+ display: flex;
|
|
|
+ gap: 3px;
|
|
|
+ padding: 12px 30px;
|
|
|
+ background: var(--paper-dark);
|
|
|
+ border-bottom: 1px solid var(--line);
|
|
|
+ position: relative;
|
|
|
+ z-index: 2;
|
|
|
+ }
|
|
|
+ .progress-step {
|
|
|
+ flex: 1;
|
|
|
+ height: 4px;
|
|
|
+ background: var(--line);
|
|
|
+ transition: background 0.3s;
|
|
|
+ }
|
|
|
+ .progress-step.done { background: var(--blue); }
|
|
|
+ .progress-step.current { background: var(--red); }
|
|
|
+
|
|
|
+ /* Основной контент */
|
|
|
+ .content {
|
|
|
+ padding: 30px;
|
|
|
+ position: relative;
|
|
|
+ z-index: 2;
|
|
|
+ min-height: 400px;
|
|
|
+ }
|
|
|
+ .scene { display: none; animation: fadeIn 0.4s ease-out; }
|
|
|
+ .scene.active { display: block; }
|
|
|
+ @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
|
|
|
+
|
|
|
+ .scene-num {
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 11px;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ color: var(--red);
|
|
|
+ text-transform: uppercase;
|
|
|
+ margin-bottom: 6px;
|
|
|
+ }
|
|
|
+ .scene-title {
|
|
|
+ font-family: 'Oswald', sans-serif;
|
|
|
+ font-size: 22px;
|
|
|
+ font-weight: 500;
|
|
|
+ letter-spacing: 0.5px;
|
|
|
+ margin: 0 0 16px;
|
|
|
+ text-transform: uppercase;
|
|
|
+ }
|
|
|
+ .scene p {
|
|
|
+ font-size: 15px;
|
|
|
+ margin: 0 0 12px;
|
|
|
+ }
|
|
|
+ .scene p.lead {
|
|
|
+ font-size: 16px;
|
|
|
+ color: var(--ink-light);
|
|
|
+ font-style: italic;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Блок "ЗАПИШИ В ТЕТРАДЬ" */
|
|
|
+ .notebook {
|
|
|
+ background: #fffef8;
|
|
|
+ border: 1px solid var(--red);
|
|
|
+ border-left: 6px solid var(--red);
|
|
|
+ padding: 16px 20px;
|
|
|
+ margin: 20px 0;
|
|
|
+ position: relative;
|
|
|
+ background-image: repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(139,26,26,0.08) 24px);
|
|
|
+ }
|
|
|
+ .notebook::before {
|
|
|
+ content: 'ЗАПИШИ В ТЕТРАДЬ';
|
|
|
+ position: absolute;
|
|
|
+ top: -10px;
|
|
|
+ left: 12px;
|
|
|
+ background: var(--red);
|
|
|
+ color: #fff;
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 10px;
|
|
|
+ font-weight: 700;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ padding: 2px 8px;
|
|
|
+ }
|
|
|
+ .notebook p {
|
|
|
+ margin: 6px 0;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 1.7;
|
|
|
+ }
|
|
|
+ .notebook p:first-child { margin-top: 4px; }
|
|
|
+ .notebook strong { color: var(--red); }
|
|
|
+ .notebook .formula {
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ background: rgba(139,26,26,0.08);
|
|
|
+ padding: 2px 6px;
|
|
|
+ font-size: 13px;
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Схемы и визуализации */
|
|
|
+ .viz {
|
|
|
+ background: #fffef8;
|
|
|
+ border: 1px solid var(--line);
|
|
|
+ padding: 16px;
|
|
|
+ margin: 20px 0;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .viz canvas { display: block; width: 100%; }
|
|
|
+ .viz-caption {
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 11px;
|
|
|
+ color: var(--ink-light);
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 8px;
|
|
|
+ letter-spacing: 0.5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Две колонки */
|
|
|
+ .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
|
|
+ @media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
|
|
|
+
|
|
|
+ /* Ползунки */
|
|
|
+ .control-group {
|
|
|
+ margin: 14px 0;
|
|
|
+ }
|
|
|
+ .control-label {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 12px;
|
|
|
+ text-transform: uppercase;
|
|
|
+ letter-spacing: 0.5px;
|
|
|
+ margin-bottom: 4px;
|
|
|
+ }
|
|
|
+ .control-label .val {
|
|
|
+ color: var(--blue);
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+ input[type=range] {
|
|
|
+ -webkit-appearance: none;
|
|
|
+ width: 100%;
|
|
|
+ height: 6px;
|
|
|
+ background: linear-gradient(to right, var(--line), var(--ink-light));
|
|
|
+ border-radius: 3px;
|
|
|
+ outline: none;
|
|
|
+ margin: 6px 0;
|
|
|
+ }
|
|
|
+ input[type=range]::-webkit-slider-thumb {
|
|
|
+ -webkit-appearance: none;
|
|
|
+ width: 18px;
|
|
|
+ height: 18px;
|
|
|
+ background: var(--red);
|
|
|
+ border: 2px solid var(--ink);
|
|
|
+ border-radius: 50%;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ input[type=range]::-moz-range-thumb {
|
|
|
+ width: 18px;
|
|
|
+ height: 18px;
|
|
|
+ background: var(--red);
|
|
|
+ border: 2px solid var(--ink);
|
|
|
+ border-radius: 50%;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Индикатор */
|
|
|
+ .indicator {
|
|
|
+ background: var(--ink);
|
|
|
+ color: #4af626;
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: 700;
|
|
|
+ padding: 10px 16px;
|
|
|
+ text-align: right;
|
|
|
+ border-radius: 3px;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ text-shadow: 0 0 8px rgba(74,246,38,0.6);
|
|
|
+ margin: 12px 0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: baseline;
|
|
|
+ }
|
|
|
+ .indicator small {
|
|
|
+ font-size: 11px;
|
|
|
+ color: #8aa;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Обратная связь */
|
|
|
+ .feedback {
|
|
|
+ background: rgba(26,74,106,0.06);
|
|
|
+ border-left: 3px solid var(--blue);
|
|
|
+ padding: 10px 14px;
|
|
|
+ font-size: 13px;
|
|
|
+ font-style: italic;
|
|
|
+ color: var(--ink-light);
|
|
|
+ margin: 12px 0;
|
|
|
+ min-height: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Кнопки */
|
|
|
+ .nav {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 16px 30px;
|
|
|
+ border-top: 2px solid var(--ink);
|
|
|
+ background: var(--paper-dark);
|
|
|
+ position: relative;
|
|
|
+ z-index: 2;
|
|
|
+ }
|
|
|
+ button {
|
|
|
+ font-family: 'Oswald', sans-serif;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 500;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ text-transform: uppercase;
|
|
|
+ padding: 10px 24px;
|
|
|
+ border: 2px solid var(--ink);
|
|
|
+ background: var(--paper);
|
|
|
+ color: var(--ink);
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.15s;
|
|
|
+ }
|
|
|
+ button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
|
|
|
+ button:disabled { opacity: 0.3; cursor: not-allowed; }
|
|
|
+ button.primary {
|
|
|
+ background: var(--red);
|
|
|
+ color: #fff;
|
|
|
+ border-color: var(--red);
|
|
|
+ }
|
|
|
+ button.primary:hover:not(:disabled) { background: var(--red-light); border-color: var(--red-light); }
|
|
|
+ button.ghost { background: transparent; }
|
|
|
+
|
|
|
+ /* Схема структуры канала */
|
|
|
+ .channel-diagram {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 0;
|
|
|
+ margin: 24px 0;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ }
|
|
|
+ .channel-block {
|
|
|
+ background: #fffef8;
|
|
|
+ border: 2px solid var(--ink);
|
|
|
+ padding: 12px 20px;
|
|
|
+ text-align: center;
|
|
|
+ min-width: 140px;
|
|
|
+ }
|
|
|
+ .channel-block .label {
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 10px;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ color: var(--ink-light);
|
|
|
+ text-transform: uppercase;
|
|
|
+ margin-bottom: 4px;
|
|
|
+ }
|
|
|
+ .channel-block .name {
|
|
|
+ font-family: 'Oswald', sans-serif;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+ text-transform: uppercase;
|
|
|
+ }
|
|
|
+ .channel-arrow {
|
|
|
+ font-size: 24px;
|
|
|
+ color: var(--red);
|
|
|
+ padding: 0 8px;
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ }
|
|
|
+ .channel-block.source { border-color: var(--red); }
|
|
|
+ .channel-block.medium { border-color: var(--blue); }
|
|
|
+ .channel-block.receiver { border-color: var(--green); }
|
|
|
+
|
|
|
+ /* Схема трёх механизмов */
|
|
|
+ .mechanisms {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(3, 1fr);
|
|
|
+ gap: 12px;
|
|
|
+ margin: 20px 0;
|
|
|
+ }
|
|
|
+ @media (max-width: 640px) { .mechanisms { grid-template-columns: 1fr; } }
|
|
|
+ .mech-card {
|
|
|
+ border: 1px solid var(--line);
|
|
|
+ background: #fffef8;
|
|
|
+ padding: 12px;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .mech-card .mech-title {
|
|
|
+ font-family: 'Oswald', sans-serif;
|
|
|
+ font-size: 14px;
|
|
|
+ text-transform: uppercase;
|
|
|
+ margin-bottom: 6px;
|
|
|
+ }
|
|
|
+ .mech-card .mech-env {
|
|
|
+ font-size: 12px;
|
|
|
+ color: var(--ink-light);
|
|
|
+ font-style: italic;
|
|
|
+ }
|
|
|
+ .mech-card.ind { border-top: 4px solid var(--red); }
|
|
|
+ .mech-card.cap { border-top: 4px solid var(--blue); }
|
|
|
+ .mech-card.gal { border-top: 4px solid var(--green); }
|
|
|
+
|
|
|
+ /* Таблица защит */
|
|
|
+ .protection-table {
|
|
|
+ width: 100%;
|
|
|
+ border-collapse: collapse;
|
|
|
+ margin: 16px 0;
|
|
|
+ font-size: 13px;
|
|
|
+ }
|
|
|
+ .protection-table th {
|
|
|
+ background: var(--ink);
|
|
|
+ color: var(--paper);
|
|
|
+ padding: 8px 10px;
|
|
|
+ text-align: left;
|
|
|
+ font-family: 'Oswald', sans-serif;
|
|
|
+ font-weight: 500;
|
|
|
+ text-transform: uppercase;
|
|
|
+ font-size: 12px;
|
|
|
+ letter-spacing: 0.5px;
|
|
|
+ }
|
|
|
+ .protection-table td {
|
|
|
+ padding: 10px;
|
|
|
+ border-bottom: 1px solid var(--line);
|
|
|
+ vertical-align: top;
|
|
|
+ }
|
|
|
+ .protection-table tr:nth-child(even) td { background: rgba(0,0,0,0.02); }
|
|
|
+
|
|
|
+ /* Тест */
|
|
|
+ .question {
|
|
|
+ margin: 20px 0;
|
|
|
+ padding: 16px;
|
|
|
+ background: #fffef8;
|
|
|
+ border: 1px solid var(--line);
|
|
|
+ }
|
|
|
+ .question .q-num {
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 11px;
|
|
|
+ color: var(--red);
|
|
|
+ letter-spacing: 1px;
|
|
|
+ margin-bottom: 4px;
|
|
|
+ }
|
|
|
+ .question .q-text {
|
|
|
+ font-weight: 700;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ font-size: 15px;
|
|
|
+ }
|
|
|
+ .question label {
|
|
|
+ display: block;
|
|
|
+ padding: 6px 10px;
|
|
|
+ margin: 4px 0;
|
|
|
+ cursor: pointer;
|
|
|
+ border: 1px solid transparent;
|
|
|
+ border-radius: 2px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .question label:hover { background: rgba(26,42,74,0.05); }
|
|
|
+ .question input[type=radio] { margin-right: 8px; accent-color: var(--red); }
|
|
|
+ .question .explain {
|
|
|
+ display: none;
|
|
|
+ margin-top: 10px;
|
|
|
+ padding: 10px;
|
|
|
+ background: rgba(26,74,106,0.08);
|
|
|
+ border-left: 3px solid var(--blue);
|
|
|
+ font-size: 13px;
|
|
|
+ font-style: italic;
|
|
|
+ }
|
|
|
+ .question .explain.show { display: block; }
|
|
|
+ .question.correct { border-color: var(--green); }
|
|
|
+ .question.incorrect { border-color: var(--red); }
|
|
|
+ .question .result-mark {
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+ .question .result-mark.ok { color: var(--green); }
|
|
|
+ .question .result-mark.bad { color: var(--red); }
|
|
|
+
|
|
|
+ /* Чек-лист */
|
|
|
+ .checklist {
|
|
|
+ background: #fffef8;
|
|
|
+ border: 1px solid var(--line);
|
|
|
+ padding: 16px;
|
|
|
+ margin: 20px 0;
|
|
|
+ }
|
|
|
+ .checklist h4 {
|
|
|
+ font-family: 'Oswald', sans-serif;
|
|
|
+ font-size: 14px;
|
|
|
+ text-transform: uppercase;
|
|
|
+ margin: 0 0 10px;
|
|
|
+ letter-spacing: 0.5px;
|
|
|
+ }
|
|
|
+ .checklist label {
|
|
|
+ display: block;
|
|
|
+ padding: 4px 0;
|
|
|
+ font-size: 13px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .checklist input[type=checkbox] { margin-right: 8px; accent-color: var(--green); }
|
|
|
+
|
|
|
+ /* Финал */
|
|
|
+ .final-score {
|
|
|
+ text-align: center;
|
|
|
+ padding: 30px 20px;
|
|
|
+ background: #fffef8;
|
|
|
+ border: 2px solid var(--ink);
|
|
|
+ margin: 20px 0;
|
|
|
+ }
|
|
|
+ .final-score .num {
|
|
|
+ font-family: 'Oswald', sans-serif;
|
|
|
+ font-size: 56px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: var(--red);
|
|
|
+ line-height: 1;
|
|
|
+ }
|
|
|
+ .final-score .of {
|
|
|
+ font-family: 'Roboto Mono', monospace;
|
|
|
+ font-size: 14px;
|
|
|
+ color: var(--ink-light);
|
|
|
+ margin-top: 4px;
|
|
|
+ }
|
|
|
+ .final-score .verdict {
|
|
|
+ font-family: 'Oswald', sans-serif;
|
|
|
+ font-size: 18px;
|
|
|
+ text-transform: uppercase;
|
|
|
+ margin-top: 12px;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Кнопка "двигать магнит" */
|
|
|
+ .magnet-demo {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 30px;
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+ .magnet {
|
|
|
+ width: 40px;
|
|
|
+ height: 80px;
|
|
|
+ background: linear-gradient(to bottom, var(--red) 50%, var(--blue) 50%);
|
|
|
+ border: 2px solid var(--ink);
|
|
|
+ border-radius: 2px;
|
|
|
+ transition: transform 0.6s ease;
|
|
|
+ }
|
|
|
+ .magnet.moving { transform: translateX(40px); }
|
|
|
+ .coil {
|
|
|
+ width: 80px;
|
|
|
+ height: 100px;
|
|
|
+ border: 3px solid var(--ink);
|
|
|
+ border-radius: 8px;
|
|
|
+ position: relative;
|
|
|
+ background: repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(26,42,74,0.15) 9px);
|
|
|
+ }
|
|
|
+ .galvanometer {
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ border: 2px solid var(--ink);
|
|
|
+ border-radius: 50%;
|
|
|
+ position: relative;
|
|
|
+ background: #fffef8;
|
|
|
+ }
|
|
|
+ .galvanometer::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ bottom: 50%;
|
|
|
+ left: 50%;
|
|
|
+ width: 2px;
|
|
|
+ height: 22px;
|
|
|
+ background: var(--red);
|
|
|
+ transform-origin: bottom center;
|
|
|
+ transform: translateX(-50%) rotate(0deg);
|
|
|
+ transition: transform 0.3s ease;
|
|
|
+ }
|
|
|
+ .galvanometer.deflect::after { transform: translateX(-50%) rotate(35deg); }
|
|
|
+
|
|
|
+ .hint {
|
|
|
+ font-size: 12px;
|
|
|
+ color: var(--ink-light);
|
|
|
+ font-style: italic;
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Мобильная адаптация */
|
|
|
+ @media (max-width: 640px) {
|
|
|
+ body { padding: 10px; }
|
|
|
+ .header { padding: 16px 20px 12px; }
|
|
|
+ .header h1 { font-size: 20px; }
|
|
|
+ .content { padding: 20px; }
|
|
|
+ .nav { padding: 12px 20px; }
|
|
|
+ button { padding: 8px 16px; font-size: 12px; }
|
|
|
+ .channel-diagram { gap: 4px; }
|
|
|
+ .channel-block { min-width: 100px; padding: 8px 10px; }
|
|
|
+ .channel-arrow { font-size: 18px; padding: 0 2px; }
|
|
|
+ }
|
|
|
+</style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="app">
|
|
|
+
|
|
|
+ <div class="header">
|
|
|
+ <div class="header-top">
|
|
|
+ <span>МДК.03.01 · Техническая защита информации</span>
|
|
|
+ <span>3.1.400</span>
|
|
|
+ </div>
|
|
|
+ <h1>Электромагнитный канал утечки информации</h1>
|
|
|
+ <div class="sub">Один канал — три механизма</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="progress" id="progress"></div>
|
|
|
+
|
|
|
+ <div class="content" id="content">
|
|
|
+
|
|
|
+ <!-- СЦЕНА 1: Цель -->
|
|
|
+ <div class="scene active" data-scene="1">
|
|
|
+ <div class="scene-num">Цель</div>
|
|
|
+ <h2 class="scene-title">Что вы узнаете</h2>
|
|
|
+ <p class="lead">Пройдите интерактив последовательно: сначала вспомним физику, потом разберём структуру канала, затем — три механизма наводок и защиту от каждого.</p>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>После прохождения вы сможете:</strong></p>
|
|
|
+ <p>1. Объяснить, какие электромагнитные явления лежат в основе передачи информации и перехвата.</p>
|
|
|
+ <p>2. Описать структуру канала: источник → среда → приёмник.</p>
|
|
|
+ <p>3. Различить три механизма наводок по физической природе, а не по названию.</p>
|
|
|
+ <p>4. Объяснить, почему защита от разных механизмов разная.</p>
|
|
|
+ </div>
|
|
|
+ <p class="hint">Ключевая мысль: электромагнитный канал один. Структура одна. Механизмов связи — три, и они разные физически.</p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 2: Электрическое и магнитное поле -->
|
|
|
+ <div class="scene" data-scene="2">
|
|
|
+ <div class="scene-num">Актуализация · 1 из 4</div>
|
|
|
+ <h2 class="scene-title">Электрическое и магнитное поле</h2>
|
|
|
+ <p>Вспомним два фундаментальных понятия. Они понадобятся, чтобы понять, почему наводки бывают разными.</p>
|
|
|
+ <div class="two-col">
|
|
|
+ <div class="viz">
|
|
|
+ <canvas id="fieldE" width="400" height="180"></canvas>
|
|
|
+ <div class="viz-caption">Электрическое поле: линии от зарядов</div>
|
|
|
+ </div>
|
|
|
+ <div class="viz">
|
|
|
+ <canvas id="fieldB" width="400" height="180"></canvas>
|
|
|
+ <div class="viz-caption">Магнитное поле: линии вокруг тока</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>Электрическое поле</strong> — создаётся электрическими зарядами, действует на заряды силой.</p>
|
|
|
+ <p><strong>Магнитное поле</strong> — создаётся движущимися зарядами (током), действует на движущиеся заряды.</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 3: Магнитное поле вокруг проводника -->
|
|
|
+ <div class="scene" data-scene="3">
|
|
|
+ <div class="scene-num">Актуализация · 2 из 4</div>
|
|
|
+ <h2 class="scene-title">Магнитное поле вокруг проводника с током</h2>
|
|
|
+ <p>Подвигайте ползунок: чем больше ток, тем сильнее поле.</p>
|
|
|
+ <div class="viz">
|
|
|
+ <canvas id="wireB" width="800" height="220"></canvas>
|
|
|
+ <div class="viz-caption">Концентрические линии магнитного поля вокруг провода</div>
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Ток, А</span><span class="val" id="currentVal2">5</span></div>
|
|
|
+ <input type="range" id="currentSlider2" min="0" max="10" step="0.5" value="5">
|
|
|
+ </div>
|
|
|
+ <div class="notebook">
|
|
|
+ <p>Вокруг проводника с током возникает магнитное поле. Чем больше ток, тем сильнее поле.</p>
|
|
|
+ <p>Направление — по правилу буравчика: если вкручивать буравчик по току, рукоятка вращается по линиям поля.</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 4: Электромагнитная индукция -->
|
|
|
+ <div class="scene" data-scene="4">
|
|
|
+ <div class="scene-num">Актуализация · 3 из 4</div>
|
|
|
+ <h2 class="scene-title">Возникновение тока при изменении магнитного поля</h2>
|
|
|
+ <p>Нажмите кнопку и наблюдайте: при движении магнита стрелка гальванометра отклоняется. Остановите магнит — ток исчезает.</p>
|
|
|
+ <div class="viz">
|
|
|
+ <div class="magnet-demo">
|
|
|
+ <div class="magnet" id="magnet"></div>
|
|
|
+ <div class="coil"></div>
|
|
|
+ <div class="galvanometer" id="galvanometer"></div>
|
|
|
+ </div>
|
|
|
+ <div style="text-align:center; margin-top:12px;">
|
|
|
+ <button id="moveMagnet">Двигать магнит</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>Электромагнитная индукция</strong> — при изменении магнитного потока через контур в нём возникает ЭДС (и ток, если контур замкнут).</p>
|
|
|
+ <p>Закон Фарадея: <span class="formula">ЭДС = −dФ/dt</span>. Важно: ток возникает только при <em>изменении</em> потока, а не при постоянном поле.</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 5: Конденсатор и индуктивность -->
|
|
|
+ <div class="scene" data-scene="5">
|
|
|
+ <div class="scene-num">Актуализация · 4 из 4</div>
|
|
|
+ <h2 class="scene-title">Конденсатор и индуктивность</h2>
|
|
|
+ <p>Два элемента, которые накапливают энергию поля. Они понадобятся, чтобы понять паразитные связи.</p>
|
|
|
+ <div class="two-col">
|
|
|
+ <div class="viz">
|
|
|
+ <canvas id="capacitorViz" width="400" height="180"></canvas>
|
|
|
+ <div class="viz-caption">Конденсатор: две пластины, электрическое поле</div>
|
|
|
+ </div>
|
|
|
+ <div class="viz">
|
|
|
+ <canvas id="inductorViz" width="400" height="180"></canvas>
|
|
|
+ <div class="viz-caption">Индуктивность: катушка, магнитное поле</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>Конденсатор</strong> — две проводящие пластины, разделённые диэлектриком. Накапливает заряд, создаёт электрическое поле между пластинами.</p>
|
|
|
+ <p><strong>Индуктивность</strong> — свойство проводника накапливать энергию магнитного поля при протекании тока.</p>
|
|
|
+ </div>
|
|
|
+ <p class="hint">Подводка: два провода рядом — это паразитный конденсатор (ёмкость). Провод с током рядом с другим — паразитная индуктивность. Отсюда — два механизма наводок.</p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 6: Структура канала -->
|
|
|
+ <div class="scene" data-scene="6">
|
|
|
+ <div class="scene-num">Новая тема · структура</div>
|
|
|
+ <h2 class="scene-title">Структура канала передачи информации</h2>
|
|
|
+ <p>Любой канал — от полезного сигнала до утечки — устроен одинаково: есть источник, среда и приёмник.</p>
|
|
|
+ <div class="channel-diagram">
|
|
|
+ <div class="channel-block source">
|
|
|
+ <div class="label">Источник</div>
|
|
|
+ <div class="name">Создаёт сигнал</div>
|
|
|
+ </div>
|
|
|
+ <div class="channel-arrow">→</div>
|
|
|
+ <div class="channel-block medium">
|
|
|
+ <div class="label">Среда</div>
|
|
|
+ <div class="name">Переносит</div>
|
|
|
+ </div>
|
|
|
+ <div class="channel-arrow">→</div>
|
|
|
+ <div class="channel-block receiver">
|
|
|
+ <div class="label">Приёмник</div>
|
|
|
+ <div class="name">Принимает</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>Канал передачи информации</strong> — путь от источника к приёмнику.</p>
|
|
|
+ <p>Структура: <strong>источник</strong> (создаёт сигнал) → <strong>среда</strong> (переносит) → <strong>приёмник</strong> (принимает).</p>
|
|
|
+ <p>В электромагнитном канале среда — это электрическое или магнитное поле, либо общий проводник.</p>
|
|
|
+ </div>
|
|
|
+ <p><strong>Ключевая мысль:</strong> те же явления злоумышленник использует для перехвата. Канал тот же, но работает против вас.</p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 7: Наводки — три механизма -->
|
|
|
+ <div class="scene" data-scene="7">
|
|
|
+ <div class="scene-num">Новая тема · механизмы</div>
|
|
|
+ <h2 class="scene-title">Наводки: три механизма одного канала</h2>
|
|
|
+ <p>Наводка — это помеха в сигнальной цепи. Механизмов три, и они разные физически, хотя структура канала общая.</p>
|
|
|
+ <div class="mechanisms">
|
|
|
+ <div class="mech-card ind">
|
|
|
+ <div class="mech-title">Индуктивный</div>
|
|
|
+ <div class="mech-env">Среда — магнитное поле</div>
|
|
|
+ </div>
|
|
|
+ <div class="mech-card cap">
|
|
|
+ <div class="mech-title">Ёмкостный</div>
|
|
|
+ <div class="mech-env">Среда — электрическое поле</div>
|
|
|
+ </div>
|
|
|
+ <div class="mech-card gal">
|
|
|
+ <div class="mech-title">Гальванический</div>
|
|
|
+ <div class="mech-env">Среда — общий проводник</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>Наводка</strong> — помеха, наведённая в сигнальной цепи за счёт паразитной связи с другой цепью.</p>
|
|
|
+ <p>Виды: <strong>индуктивная</strong> (через магнитное поле), <strong>ёмкостная</strong> (через электрическое поле), <strong>гальваническая</strong> (через общий проводник).</p>
|
|
|
+ <p>Это один канал, три разных физических механизма. Структура общая: источник → среда → приёмник.</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 8: Индуктивная наводка -->
|
|
|
+ <div class="scene" data-scene="8">
|
|
|
+ <div class="scene-num">Механизм 1 · индуктивный</div>
|
|
|
+ <h2 class="scene-title">Индуктивная наводка</h2>
|
|
|
+ <p>Источник — провод с переменным током. Среда — магнитное поле. Приёмник — петля сигнального провода. Изменение магнитного потока через петлю наводит в ней ЭДС.</p>
|
|
|
+ <div class="viz">
|
|
|
+ <canvas id="inductiveViz" width="800" height="240"></canvas>
|
|
|
+ <div class="viz-caption">Магнитное поле от силового провода прошивает петлю сигнального</div>
|
|
|
+ </div>
|
|
|
+ <div class="two-col">
|
|
|
+ <div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Ток источника, А</span><span class="val" id="indCurrentVal">5</span></div>
|
|
|
+ <input type="range" id="indCurrent" min="0" max="10" step="0.5" value="5">
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Частота, Гц</span><span class="val" id="indFreqVal">500</span></div>
|
|
|
+ <input type="range" id="indFreq" min="0" max="1000" step="50" value="500">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Расстояние, см</span><span class="val" id="indDistVal">10</span></div>
|
|
|
+ <input type="range" id="indDist" min="1" max="20" step="1" value="10">
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Площадь петли, см²</span><span class="val" id="indAreaVal">50</span></div>
|
|
|
+ <input type="range" id="indArea" min="0" max="100" step="5" value="50">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="indicator">
|
|
|
+ <small>Наведённая ЭДС</small>
|
|
|
+ <span><span id="indResult">0.0</span> мВ</span>
|
|
|
+ </div>
|
|
|
+ <div class="feedback" id="indFeedback">Двигайте ползунки, чтобы увидеть, как меняется ЭДС.</div>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>Индуктивная наводка</strong> — наведение ЭДС в контуре за счёт изменения магнитного потока от соседнего проводника с током.</p>
|
|
|
+ <p>Зависит от тока, частоты, площади петли и расстояния. При постоянном токе (частота = 0) наводки нет — поток не меняется.</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 9: Ёмкостная наводка -->
|
|
|
+ <div class="scene" data-scene="9">
|
|
|
+ <div class="scene-num">Механизм 2 · ёмкостный</div>
|
|
|
+ <h2 class="scene-title">Ёмкостная наводка</h2>
|
|
|
+ <p>Источник — провод с переменным напряжением. Среда — электрическое поле. Приёмник — провод или плата, на которой наводится заряд. Два провода рядом образуют паразитный конденсатор.</p>
|
|
|
+ <div class="viz">
|
|
|
+ <canvas id="capacitiveViz" width="800" height="240"></canvas>
|
|
|
+ <div class="viz-caption">Электрическое поле между проводами</div>
|
|
|
+ </div>
|
|
|
+ <div class="two-col">
|
|
|
+ <div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Напряжение, В</span><span class="val" id="capVoltVal">500</span></div>
|
|
|
+ <input type="range" id="capVolt" min="0" max="1000" step="50" value="500">
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Частота, Гц</span><span class="val" id="capFreqVal">500</span></div>
|
|
|
+ <input type="range" id="capFreq" min="0" max="1000" step="50" value="500">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Расстояние, см</span><span class="val" id="capDistVal">10</span></div>
|
|
|
+ <input type="range" id="capDist" min="1" max="20" step="1" value="10">
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Площадь, см²</span><span class="val" id="capAreaVal">50</span></div>
|
|
|
+ <input type="range" id="capArea" min="0" max="100" step="5" value="50">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="indicator">
|
|
|
+ <small>Наведённое напряжение</small>
|
|
|
+ <span><span id="capResult">0.0</span> мВ</span>
|
|
|
+ </div>
|
|
|
+ <div class="feedback" id="capFeedback">Двигайте ползунки, чтобы увидеть, как меняется наводка.</div>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>Ёмкостная наводка</strong> — наведение напряжения в проводнике за счёт электрического поля соседнего проводника с переменным напряжением.</p>
|
|
|
+ <p>Зависит от напряжения, частоты, площади и расстояния. При постоянном напряжении (частота = 0) наводки нет — нет изменения заряда.</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 10: Гальваническая наводка -->
|
|
|
+ <div class="scene" data-scene="10">
|
|
|
+ <div class="scene-num">Механизм 3 · гальванический</div>
|
|
|
+ <h2 class="scene-title">Гальваническая наводка</h2>
|
|
|
+ <p>Источник и приёмник связаны общим проводом (землёй, питанием). Ток от силовой нагрузки течёт по общему участку, на его сопротивлении падает напряжение — и это падение попадает в сигнальную цепь.</p>
|
|
|
+ <div class="viz">
|
|
|
+ <canvas id="galvanicViz" width="800" height="240"></canvas>
|
|
|
+ <div class="viz-caption">Общий проводник с сопротивлением R: падение напряжения U = I·R</div>
|
|
|
+ </div>
|
|
|
+ <div class="two-col">
|
|
|
+ <div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Ток в общей цепи, А</span><span class="val" id="galCurrentVal">5</span></div>
|
|
|
+ <input type="range" id="galCurrent" min="0" max="10" step="0.5" value="5">
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Сопротивление, Ом</span><span class="val" id="galResVal">0.5</span></div>
|
|
|
+ <input type="range" id="galRes" min="0" max="1" step="0.05" value="0.5">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="control-group">
|
|
|
+ <div class="control-label"><span>Качество заземления, %</span><span class="val" id="galGroundVal">50</span></div>
|
|
|
+ <input type="range" id="galGround" min="0" max="100" step="5" value="50">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="indicator">
|
|
|
+ <small>Помеха в сигнальной цепи</small>
|
|
|
+ <span><span id="galResult">0.0</span> мВ</span>
|
|
|
+ </div>
|
|
|
+ <div class="feedback" id="galFeedback">Двигайте ползунки, чтобы увидеть, как меняется помеха.</div>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>Гальваническая наводка</strong> — помеха, попадающая в сигнальную цепь через общий проводник (землю, питание) за счёт падения напряжения на его сопротивлении.</p>
|
|
|
+ <p>Зависит от тока, сопротивления общего участка и качества заземления. По закону Ома: <span class="formula">U = I·R</span>.</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 11: Защита -->
|
|
|
+ <div class="scene" data-scene="11">
|
|
|
+ <div class="scene-num">Применение · защита</div>
|
|
|
+ <h2 class="scene-title">Как защищаться от каждого механизма</h2>
|
|
|
+ <p>Механизмы разные — значит, и защита разная. Один и тот же способ не работает одинаково против всех трёх.</p>
|
|
|
+ <table class="protection-table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Механизм</th>
|
|
|
+ <th>От чего зависит</th>
|
|
|
+ <th>Защита</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td><strong>Индуктивный</strong></td>
|
|
|
+ <td>Ток, частота, площадь петли, расстояние</td>
|
|
|
+ <td>Разнос, витая пара, экран из магнитного материала</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><strong>Ёмкостный</strong></td>
|
|
|
+ <td>Напряжение, частота, площадь, расстояние</td>
|
|
|
+ <td>Экран (электростатический), разнос, заземление экрана</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><strong>Гальванический</strong></td>
|
|
|
+ <td>Ток, сопротивление общего участка, заземление</td>
|
|
|
+ <td>Разрыв общей цепи (оптрон, трансформатор), правильное заземление</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div class="notebook">
|
|
|
+ <p><strong>От индуктивной</strong> — разнос, витая пара, экран из магнитного материала.</p>
|
|
|
+ <p><strong>От ёмкостной</strong> — экран (электростатический), разнос, заземление экрана.</p>
|
|
|
+ <p><strong>От гальванической</strong> — разрыв общей цепи (оптрон, трансформатор), правильное заземление.</p>
|
|
|
+ </div>
|
|
|
+ <p><strong>Ключевая мысль:</strong> защита разная, потому что механизмы разные. Экран от ёмкостной работает, от гальванической — нет.</p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- СЦЕНА 12: Тест -->
|
|
|
+ <div class="scene" data-scene="12">
|
|
|
+ <div class="scene-num">Проверка</div>
|
|
|
+ <h2 class="scene-title">Тест: проверьте понимание</h2>
|
|
|
+ <p>Ответьте на вопросы. После каждого ответа — пояснение. В конце — результат и чек-лист конспекта.</p>
|
|
|
+ <div id="quizContainer"></div>
|
|
|
+ <div id="quizResult" style="display:none;"></div>
|
|
|
+ <div class="checklist" id="finalChecklist" style="display:none;">
|
|
|
+ <h4>Проверь, что записал в тетрадь</h4>
|
|
|
+ <label><input type="checkbox"> Определение электрического и магнитного поля</label>
|
|
|
+ <label><input type="checkbox"> Электромагнитная индукция (закон Фарадея)</label>
|
|
|
+ <label><input type="checkbox"> Конденсатор и индуктивность</label>
|
|
|
+ <label><input type="checkbox"> Структура канала: источник → среда → приёмник</label>
|
|
|
+ <label><input type="checkbox"> Определение наводки</label>
|
|
|
+ <label><input type="checkbox"> Три механизма: индуктивный, ёмкостный, гальванический</label>
|
|
|
+ <label><input type="checkbox"> Зависимости каждого механизма</label>
|
|
|
+ <label><input type="checkbox"> Защита от каждого механизма</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="nav">
|
|
|
+ <button id="prevBtn" class="ghost" disabled>← Назад</button>
|
|
|
+ <span id="navLabel" style="font-family: 'Roboto Mono', monospace; font-size: 12px; color: var(--ink-light);"></span>
|
|
|
+ <button id="nextBtn" class="primary">Дальше →</button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+</div>
|
|
|
+
|
|
|
+<script>
|
|
|
+(function() {
|
|
|
+ 'use strict';
|
|
|
+
|
|
|
+ // === НАВИГАЦИЯ ===
|
|
|
+ const scenes = document.querySelectorAll('.scene');
|
|
|
+ const totalScenes = scenes.length;
|
|
|
+ const progress = document.getElementById('progress');
|
|
|
+ const prevBtn = document.getElementById('prevBtn');
|
|
|
+ const nextBtn = document.getElementById('nextBtn');
|
|
|
+ const navLabel = document.getElementById('navLabel');
|
|
|
+ let current = 0;
|
|
|
+
|
|
|
+ // Построить прогресс
|
|
|
+ for (let i = 0; i < totalScenes; i++) {
|
|
|
+ const step = document.createElement('div');
|
|
|
+ step.className = 'progress-step';
|
|
|
+ progress.appendChild(step);
|
|
|
+ }
|
|
|
+ const progressSteps = progress.querySelectorAll('.progress-step');
|
|
|
+
|
|
|
+ function showScene(index) {
|
|
|
+ scenes.forEach((s, i) => s.classList.toggle('active', i === index));
|
|
|
+ progressSteps.forEach((s, i) => {
|
|
|
+ s.classList.toggle('done', i < index);
|
|
|
+ s.classList.toggle('current', i === index);
|
|
|
+ });
|
|
|
+ prevBtn.disabled = index === 0;
|
|
|
+ nextBtn.textContent = index === totalScenes - 1 ? 'К началу' : 'Дальше →';
|
|
|
+ navLabel.textContent = (index + 1) + ' / ' + totalScenes;
|
|
|
+
|
|
|
+ // Инициализация визуализаций при показе
|
|
|
+ if (index === 1) initFields();
|
|
|
+ if (index === 2) drawWireB();
|
|
|
+ if (index === 4) { drawCapacitor(); drawInductor(); }
|
|
|
+ if (index === 7) drawInductive();
|
|
|
+ if (index === 8) drawCapacitive();
|
|
|
+ if (index === 9) drawGalvanic();
|
|
|
+ if (index === 11) initQuiz();
|
|
|
+
|
|
|
+ window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
|
+ }
|
|
|
+
|
|
|
+ prevBtn.addEventListener('click', () => {
|
|
|
+ if (current > 0) { current--; showScene(current); }
|
|
|
+ });
|
|
|
+ nextBtn.addEventListener('click', () => {
|
|
|
+ if (current < totalScenes - 1) { current++; showScene(current); }
|
|
|
+ else { current = 0; showScene(0); }
|
|
|
+ });
|
|
|
+
|
|
|
+ // === СЦЕНА 2: Поля ===
|
|
|
+ function initFields() {
|
|
|
+ const eCanvas = document.getElementById('fieldE');
|
|
|
+ const eCtx = eCanvas.getContext('2d');
|
|
|
+ const bCanvas = document.getElementById('fieldB');
|
|
|
+ const bCtx = bCanvas.getContext('2d');
|
|
|
+
|
|
|
+ // Электрическое поле: линии от плюса к минусу
|
|
|
+ eCtx.clearRect(0, 0, 400, 180);
|
|
|
+ eCtx.fillStyle = '#f2e9d6';
|
|
|
+ eCtx.fillRect(0, 0, 400, 180);
|
|
|
+
|
|
|
+ // Два заряда
|
|
|
+ eCtx.fillStyle = '#8b1a1a';
|
|
|
+ eCtx.beginPath(); eCtx.arc(100, 90, 14, 0, Math.PI*2); eCtx.fill();
|
|
|
+ eCtx.fillStyle = '#1a4a6a';
|
|
|
+ eCtx.beginPath(); eCtx.arc(300, 90, 14, 0, Math.PI*2); eCtx.fill();
|
|
|
+ eCtx.fillStyle = '#fff';
|
|
|
+ eCtx.font = 'bold 16px serif';
|
|
|
+ eCtx.textAlign = 'center'; eCtx.textBaseline = 'middle';
|
|
|
+ eCtx.fillText('+', 100, 90);
|
|
|
+ eCtx.fillText('−', 300, 90);
|
|
|
+
|
|
|
+ // Линии поля
|
|
|
+ eCtx.strokeStyle = 'rgba(139,26,26,0.4)';
|
|
|
+ eCtx.lineWidth = 1.5;
|
|
|
+ for (let i = 0; i < 8; i++) {
|
|
|
+ const y = 30 + i * 18;
|
|
|
+ eCtx.beginPath();
|
|
|
+ eCtx.moveTo(114, 90);
|
|
|
+ eCtx.quadraticCurveTo(200, y, 286, 90);
|
|
|
+ eCtx.stroke();
|
|
|
+ }
|
|
|
+
|
|
|
+ // Магнитное поле: концентрические круги
|
|
|
+ bCtx.clearRect(0, 0, 400, 180);
|
|
|
+ bCtx.fillStyle = '#f2e9d6';
|
|
|
+ bCtx.fillRect(0, 0, 400, 180);
|
|
|
+
|
|
|
+ // Провод
|
|
|
+ bCtx.fillStyle = '#1a2a4a';
|
|
|
+ bCtx.fillRect(190, 20, 20, 140);
|
|
|
+ bCtx.fillStyle = '#fff';
|
|
|
+ bCtx.font = '12px monospace';
|
|
|
+ bCtx.textAlign = 'center';
|
|
|
+ bCtx.fillText('I', 200, 95);
|
|
|
+
|
|
|
+ // Линии B
|
|
|
+ bCtx.strokeStyle = 'rgba(26,74,106,0.4)';
|
|
|
+ bCtx.lineWidth = 1.5;
|
|
|
+ for (let r = 30; r <= 90; r += 15) {
|
|
|
+ bCtx.beginPath();
|
|
|
+ bCtx.arc(200, 90, r, 0, Math.PI*2);
|
|
|
+ bCtx.stroke();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // === СЦЕНА 3: Поле вокруг провода ===
|
|
|
+ let wireAnimationId = null;
|
|
|
+ function drawWireB() {
|
|
|
+ const canvas = document.getElementById('wireB');
|
|
|
+ const ctx = canvas.getContext('2d');
|
|
|
+ const current = parseFloat(document.getElementById('currentSlider2').value);
|
|
|
+
|
|
|
+ function render() {
|
|
|
+ const w = canvas.width, h = canvas.height;
|
|
|
+ ctx.fillStyle = '#f2e9d6';
|
|
|
+ ctx.fillRect(0, 0, w, h);
|
|
|
+
|
|
|
+ // Провод
|
|
|
+ ctx.fillStyle = '#1a2a4a';
|
|
|
+ ctx.fillRect(390, 20, 20, h - 40);
|
|
|
+ ctx.fillStyle = '#fff';
|
|
|
+ ctx.font = 'bold 14px monospace';
|
|
|
+ ctx.textAlign = 'center';
|
|
|
+ ctx.fillText('I', 400, h/2);
|
|
|
+
|
|
|
+ // Плотность линий зависит от тока
|
|
|
+ const maxR = 200;
|
|
|
+ const lineCount = Math.floor(current * 2);
|
|
|
+ ctx.strokeStyle = 'rgba(139,26,26,0.35)';
|
|
|
+ ctx.lineWidth = 1.5;
|
|
|
+ for (let i = 1; i <= lineCount; i++) {
|
|
|
+ const r = (i / lineCount) * maxR;
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.ellipse(400, h/2, r * 0.6, r * 1.1, 0, 0, Math.PI*2);
|
|
|
+ ctx.stroke();
|
|
|
+ }
|
|
|
+
|
|
|
+ // Подпись
|
|
|
+ ctx.fillStyle = '#4a5a7a';
|
|
|
+ ctx.font = '13px serif';
|
|
|
+ ctx.textAlign = 'center';
|
|
|
+ ctx.fillText('Ток: ' + current + ' А', 400, h - 12);
|
|
|
+ }
|
|
|
+ render();
|
|
|
+ }
|
|
|
+ document.getElementById('currentSlider2').addEventListener('input', function() {
|
|
|
+ document.getElementById('currentVal2').textContent = this.value;
|
|
|
+ drawWireB();
|
|
|
+ });
|
|
|
+
|
|
|
+ // === СЦЕНА 4: Индукция ===
|
|
|
+ let magnetAnimating = false;
|
|
|
+ document.getElementById('moveMagnet').addEventListener('click', function() {
|
|
|
+ if (magnetAnimating) return;
|
|
|
+ magnetAnimating = true;
|
|
|
+ const magnet = document.getElementById('magnet');
|
|
|
+ const galv = document.getElementById('galvanometer');
|
|
|
+
|
|
|
+ magnet.classList.add('moving');
|
|
|
+ galv.classList.add('deflect');
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ magnet.classList.remove('moving');
|
|
|
+ galv.classList.remove('deflect');
|
|
|
+ setTimeout(() => { magnetAnimating = false; }, 400);
|
|
|
+ }, 700);
|
|
|
+ });
|
|
|
+
|
|
|
+ // === СЦЕНА 5: Конденсатор и индуктивность ===
|
|
|
+ function drawCapacitor() {
|
|
|
+ const c = document.getElementById('capacitorViz');
|
|
|
+ const ctx = c.getContext('2d');
|
|
|
+ ctx.fillStyle = '#f2e9d6';
|
|
|
+ ctx.fillRect(0, 0, 400, 180);
|
|
|
+
|
|
|
+ // Пластины
|
|
|
+ ctx.fillStyle = '#8b1a1a';
|
|
|
+ ctx.fillRect(120, 50, 12, 80);
|
|
|
+ ctx.fillStyle = '#1a4a6a';
|
|
|
+ ctx.fillRect(268, 50, 12, 80);
|
|
|
+
|
|
|
+ // Поле между
|
|
|
+ ctx.strokeStyle = 'rgba(139,26,26,0.4)';
|
|
|
+ ctx.lineWidth = 1.5;
|
|
|
+ for (let y = 60; y <= 120; y += 10) {
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.moveTo(132, y);
|
|
|
+ ctx.lineTo(268, y);
|
|
|
+ ctx.stroke();
|
|
|
+ }
|
|
|
+
|
|
|
+ // Подписи
|
|
|
+ ctx.fillStyle = '#1a2a4a';
|
|
|
+ ctx.font = '13px serif';
|
|
|
+ ctx.textAlign = 'center';
|
|
|
+ ctx.fillText('+', 126, 45);
|
|
|
+ ctx.fillText('−', 274, 45);
|
|
|
+ ctx.font = '12px monospace';
|
|
|
+ ctx.fillText('E', 200, 145);
|
|
|
+ }
|
|
|
+
|
|
|
+ function drawInductor() {
|
|
|
+ const c = document.getElementById('inductorViz');
|
|
|
+ const ctx = c.getContext('2d');
|
|
|
+ ctx.fillStyle = '#f2e9d6';
|
|
|
+ ctx.fillRect(0, 0, 400, 180);
|
|
|
+
|
|
|
+ // Катушка: несколько витков
|
|
|
+ ctx.strokeStyle = '#1a2a4a';
|
|
|
+ ctx.lineWidth = 3;
|
|
|
+ ctx.beginPath();
|
|
|
+ for (let i = 0; i < 5; i++) {
|
|
|
+ const x = 140 + i * 24;
|
|
|
+ ctx.arc(x, 90, 14, -Math.PI/2, Math.PI/2);
|
|
|
+ }
|
|
|
+ ctx.stroke();
|
|
|
+
|
|
|
+ // Магнитное поле
|
|
|
+ ctx.strokeStyle = 'rgba(26,74,106,0.4)';
|
|
|
+ ctx.lineWidth = 1.5;
|
|
|
+ for (let r = 20; r <= 60; r += 12) {
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.ellipse(200, 90, r * 1.4, r, 0, 0, Math.PI*2);
|
|
|
+ ctx.stroke();
|
|
|
+ }
|
|
|
+
|
|
|
+ ctx.fillStyle = '#1a2a4a';
|
|
|
+ ctx.font = '12px monospace';
|
|
|
+ ctx.textAlign = 'center';
|
|
|
+ ctx.fillText('L', 200, 145);
|
|
|
+ }
|
|
|
+
|
|
|
+ // === СЦЕНА 8: Индуктивная ===
|
|
|
+ let indAnimId = null;
|
|
|
+ function drawInductive() {
|
|
|
+ const canvas = document.getElementById('inductiveViz');
|
|
|
+ const ctx = canvas.getContext('2d');
|
|
|
+
|
|
|
+ function render() {
|
|
|
+ const w = canvas.width, h = canvas.height;
|
|
|
+ ctx.fillStyle = '#f2e9d6';
|
|
|
+ ctx.fillRect(0, 0, w, h);
|
|
|
+
|
|
|
+ const I = parseFloat(document.getElementById('indCurrent').value);
|
|
|
+ const f = parseFloat(document.getElementById('indFreq').value);
|
|
|
+
|
|
|
+ // Силовой провод (источник) — слева
|
|
|
+ ctx.fillStyle = '#8b1a1a';
|
|
|
+ ctx.fillRect(80, 30, 14, h - 60);
|
|
|
+ ctx.fillStyle = '#8b1a1a';
|
|
|
+ ctx.font = 'bold 12px monospace';
|
|
|
+ ctx.textAlign = 'center';
|
|
|
+ ctx.fillText('I', 87, 20);
|
|
|
+
|
|
|
+ // Магнитное поле
|
|
|
+ const lineCount = Math.max(1, Math.floor(I));
|
|
|
+ ctx.strokeStyle = 'rgba(139,26,26,0.3)';
|
|
|
+ ctx.lineWidth = 1.5;
|
|
|
+ for (let i = 1; i <= lineCount; i++) {
|
|
|
+ const r = (i / lineCount) * 180;
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.ellipse(87, h/2, r * 0.7, r, 0, 0, Math.PI*2);
|
|
|
+ ctx.stroke();
|
|
|
+ }
|
|
|
+
|
|
|
+ // Петля сигнального провода — справа
|
|
|
+ ctx.strokeStyle = '#2a5a2a';
|
|
|
+ ctx.lineWidth = 3;
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.ellipse(550, h/2, 120, 70, 0, 0, Math.PI*2);
|
|
|
+ ctx.stroke();
|
|
|
+ ctx.fillStyle = '#2a5a2a';
|
|
|
+ ctx.font = '12px monospace';
|
|
|
+ ctx.fillText('петля', 550, h - 20);
|
|
|
+
|
|
|
+ // Стрелка ЭДС
|
|
|
+ const emf = calcInductive();
|
|
|
+ if (emf > 0.1) {
|
|
|
+ ctx.strokeStyle = '#8b1a1a';
|
|
|
+ ctx.lineWidth = 2;
|
|
|
+ const arrowX = 550 + 100;
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.moveTo(arrowX, h/2);
|
|
|
+ ctx.lineTo(arrowX + 30, h/2);
|
|
|
+ ctx.stroke();
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.moveTo(arrowX + 30, h/2);
|
|
|
+ ctx.lineTo(arrowX + 22, h/2 - 6);
|
|
|
+ ctx.lineTo(arrowX + 22, h/2 + 6);
|
|
|
+ ctx.closePath();
|
|
|
+ ctx.fillStyle = '#8b1a1a';
|
|
|
+ ctx.fill();
|
|
|
+ }
|
|
|
+
|
|
|
+ indAnimId = requestAnimationFrame(render);
|
|
|
+ }
|
|
|
+ render();
|
|
|
+ }
|
|
|
+
|
|
|
+ function calcInductive() {
|
|
|
+ const I = parseFloat(document.getElementById('indCurrent').value);
|
|
|
+ const f = parseFloat(document.getElementById('indFreq').value);
|
|
|
+ const d = parseFloat(document.getElementById('indDist').value);
|
|
|
+ const S = parseFloat(document.getElementById('indArea').value);
|
|
|
+ if (I === 0 || f === 0 || S === 0 || d === 0) return 0;
|
|
|
+ // Качественная модель: монотонно растёт от I, f, S, падает от d
|
|
|
+ const base = (I / 10) * (f / 1000) * (S / 100) * (1 / d) * 100;
|
|
|
+ return Math.min(base, 99.9);
|
|
|
+ }
|
|
|
+
|
|
|
+ function updateInductive() {
|
|
|
+ document.getElementById('indCurrentVal').textContent = document.getElementById('indCurrent').value;
|
|
|
+ document.getElementById('indFreqVal').textContent = document.getElementById('indFreq').value;
|
|
|
+ document.getElementById('indDistVal').textContent = document.getElementById('indDist').value;
|
|
|
+ document.getElementById('indAreaVal').textContent = document.getElementById('indArea').value;
|
|
|
+
|
|
|
+ const val = calcInductive();
|
|
|
+ document.getElementById('indResult').textContent = val.toFixed(1);
|
|
|
+
|
|
|
+ // Обратная связь
|
|
|
+ const I = parseFloat(document.getElementById('indCurrent').value);
|
|
|
+ const f = parseFloat(document.getElementById('indFreq').value);
|
|
|
+ const d = parseFloat(document.getElementById('indDist').value);
|
|
|
+ const S = parseFloat(document.getElementById('indArea').value);
|
|
|
+
|
|
|
+ let msg = '';
|
|
|
+ if (I === 0) msg = 'Ток = 0 → магнитного поля нет → ЭДС = 0.';
|
|
|
+ else if (f === 0) msg = 'Частота = 0 (постоянный ток) → магнитный поток не меняется → ЭДС = 0. Это ключевое отличие: постоянный ток не даёт индуктивной наводки.';
|
|
|
+ else if (S === 0) msg = 'Площадь петли = 0 → поток не прошивает контур → ЭДС = 0.';
|
|
|
+ else {
|
|
|
+ const parts = [];
|
|
|
+ if (I >= 7) parts.push('ток большой → поле сильное');
|
|
|
+ if (f >= 700) parts.push('частота высокая → поток меняется быстро');
|
|
|
+ if (S >= 70) parts.push('площадь петли большая → поток захватывается');
|
|
|
+ if (d <= 5) parts.push('расстояние маленькое → поле не ослабло');
|
|
|
+ if (parts.length === 0) parts.push('значения в среднем диапазоне');
|
|
|
+ msg = 'ЭДС: ' + parts.join(', ') + '.';
|
|
|
+ }
|
|
|
+ document.getElementById('indFeedback').textContent = msg;
|
|
|
+ }
|
|
|
+
|
|
|
+ ['indCurrent', 'indFreq', 'indDist', 'indArea'].forEach(id => {
|
|
|
+ document.getElementById(id).addEventListener('input', updateInductive);
|
|
|
+ });
|
|
|
+
|
|
|
+ // === СЦЕНА 9: Ёмкостная ===
|
|
|
+ function drawCapacitive() {
|
|
|
+ const canvas = document.getElementById('capacitiveViz');
|
|
|
+ const ctx = canvas.getContext('2d');
|
|
|
+
|
|
|
+ function render() {
|
|
|
+ const w = canvas.width, h = canvas.height;
|
|
|
+ ctx.fillStyle = '#f2e9d6';
|
|
|
+ ctx.fillRect(0, 0, w, h);
|
|
|
+
|
|
|
+ // Провод с напряжением
|
|
|
+ ctx.fillStyle = '#1a4a6a';
|
|
|
+ ctx.fillRect(80, 30, 14, h - 60);
|
|
|
+ ctx.fillStyle = '#1a4a6a';
|
|
|
+ ctx.font = 'bold 12px monospace';
|
|
|
+ ctx.textAlign = 'center';
|
|
|
+ ctx.fillText('U', 87, 20);
|
|
|
+
|
|
|
+ // Электрическое поле — линии между проводами
|
|
|
+ const U = parseFloat(document.getElementById('capVolt').value);
|
|
|
+ const lineCount = Math.max(1, Math.floor(U / 100));
|
|
|
+ ctx.strokeStyle = 'rgba(26,74,106,0.35)';
|
|
|
+ ctx.lineWidth = 1.5;
|
|
|
+ for (let i = 0; i < lineCount; i++) {
|
|
|
+ const y = 40 + i * (h - 80) / Math.max(1, lineCount - 1);
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.moveTo(94, y);
|
|
|
+ ctx.lineTo(520, y);
|
|
|
+ ctx.stroke();
|
|
|
+ }
|
|
|
+
|
|
|
+ // Приёмник — провод/плата
|
|
|
+ ctx.fillStyle = '#2a5a2a';
|
|
|
+ ctx.fillRect(520, 40, 14, h - 80);
|
|
|
+ ctx.fillStyle = '#2a5a2a';
|
|
|
+ ctx.fillText('приёмник', 527, h - 20);
|
|
|
+
|
|
|
+ // Заряды на приёмнике
|
|
|
+ const cap = calcCapacitive();
|
|
|
+ if (cap > 0.1) {
|
|
|
+ const charges = Math.min(8, Math.floor(cap / 10));
|
|
|
+ for (let i = 0; i < charges; i++) {
|
|
|
+ ctx.fillStyle = '#8b1a1a';
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.arc(535 + 10, 50 + i * 20, 3, 0, Math.PI*2);
|
|
|
+ ctx.fill();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ requestAnimationFrame(render);
|
|
|
+ }
|
|
|
+ render();
|
|
|
+ }
|
|
|
+
|
|
|
+ function calcCapacitive() {
|
|
|
+ const U = parseFloat(document.getElementById('capVolt').value);
|
|
|
+ const f = parseFloat(document.getElementById('capFreq').value);
|
|
|
+ const d = parseFloat(document.getElementById('capDist').value);
|
|
|
+ const S = parseFloat(document.getElementById('capArea').value);
|
|
|
+ if (U === 0 || f === 0 || S === 0 || d === 0) return 0;
|
|
|
+ const base = (U / 1000) * (f / 1000) * (S / 100) * (1 / d) * 100;
|
|
|
+ return Math.min(base, 99.9);
|
|
|
+ }
|
|
|
+
|
|
|
+ function updateCapacitive() {
|
|
|
+ document.getElementById('capVoltVal').textContent = document.getElementById('capVolt').value;
|
|
|
+ document.getElementById('capFreqVal').textContent = document.getElementById('capFreq').value;
|
|
|
+ document.getElementById('capDistVal').textContent = document.getElementById('capDist').value;
|
|
|
+ document.getElementById('capAreaVal').textContent = document.getElementById('capArea').value;
|
|
|
+
|
|
|
+ const val = calcCapacitive();
|
|
|
+ document.getElementById('capResult').textContent = val.toFixed(1);
|
|
|
+
|
|
|
+ const U = parseFloat(document.getElementById('capVolt').value);
|
|
|
+ const f = parseFloat(document.getElementById('capFreq').value);
|
|
|
+ const d = parseFloat(document.getElementById('capDist').value);
|
|
|
+ const S = parseFloat(document.getElementById('capArea').value);
|
|
|
+
|
|
|
+ let msg = '';
|
|
|
+ if (U === 0) msg = 'Напряжение = 0 → электрического поля нет → наводки нет.';
|
|
|
+ else if (f === 0) msg = 'Частота = 0 (постоянное напряжение) → заряд не меняется → наводки нет.';
|
|
|
+ else if (S === 0) msg = 'Площадь = 0 → ёмкость связи нулевая → наводки нет.';
|
|
|
+ else {
|
|
|
+ const parts = [];
|
|
|
+ if (U >= 700) parts.push('напряжение большое → заряд на пластинах велик');
|
|
|
+ if (f >= 700) parts.push('частота высокая → ток смещения больше');
|
|
|
+ if (S >= 70) parts.push('площадь большая → ёмкость больше');
|
|
|
+ if (d <= 5) parts.push('расстояние маленькое → ёмкость не ослабла');
|
|
|
+ if (parts.length === 0) parts.push('значения в среднем диапазоне');
|
|
|
+ msg = 'Наводка: ' + parts.join(', ') + '.';
|
|
|
+ }
|
|
|
+ document.getElementById('capFeedback').textContent = msg;
|
|
|
+ }
|
|
|
+
|
|
|
+ ['capVolt', 'capFreq', 'capDist', 'capArea'].forEach(id => {
|
|
|
+ document.getElementById(id).addEventListener('input', updateCapacitive);
|
|
|
+ });
|
|
|
+
|
|
|
+ // === СЦЕНА 10: Гальваническая ===
|
|
|
+ function drawGalvanic() {
|
|
|
+ const canvas = document.getElementById('galvanicViz');
|
|
|
+ const ctx = canvas.getContext('2d');
|
|
|
+
|
|
|
+ function render() {
|
|
|
+ const w = canvas.width, h = canvas.height;
|
|
|
+ ctx.fillStyle = '#f2e9d6';
|
|
|
+ ctx.fillRect(0, 0, w, h);
|
|
|
+
|
|
|
+ const I = parseFloat(document.getElementById('galCurrent').value);
|
|
|
+ const R = parseFloat(document.getElementById('galRes').value);
|
|
|
+ const G = parseFloat(document.getElementById('galGround').value);
|
|
|
+
|
|
|
+ // Общий провод внизу
|
|
|
+ ctx.strokeStyle = '#1a2a4a';
|
|
|
+ ctx.lineWidth = 4;
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.moveTo(80, h - 50);
|
|
|
+ ctx.lineTo(w - 80, h - 50);
|
|
|
+ ctx.stroke();
|
|
|
+
|
|
|
+ // Силовая нагрузка (источник)
|
|
|
+ ctx.fillStyle = '#8b1a1a';
|
|
|
+ ctx.fillRect(120, 60, 100, 50);
|
|
|
+ ctx.fillStyle = '#fff';
|
|
|
+ ctx.font = 'bold 12px monospace';
|
|
|
+ ctx.textAlign = 'center';
|
|
|
+ ctx.fillText('нагрузка', 170, 80);
|
|
|
+ ctx.fillText('I = ' + I + ' А', 170, 98);
|
|
|
+
|
|
|
+ // Сигнальная цепь
|
|
|
+ ctx.fillStyle = '#2a5a2a';
|
|
|
+ ctx.fillRect(480, 60, 100, 50);
|
|
|
+ ctx.fillStyle = '#fff';
|
|
|
+ ctx.fillText('сигнал', 530, 80);
|
|
|
+ ctx.fillText('U_помехи', 530, 98);
|
|
|
+
|
|
|
+ // Соединения с общим проводом
|
|
|
+ ctx.strokeStyle = '#8b1a1a';
|
|
|
+ ctx.lineWidth = 2;
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.moveTo(170, 110); ctx.lineTo(170, h - 50);
|
|
|
+ ctx.stroke();
|
|
|
+ ctx.beginPath();
|
|
|
+ ctx.moveTo(530, 110); ctx.lineTo(530, h - 50);
|
|
|
+ ctx.stroke();
|
|
|
+
|
|
|
+ // Сопротивление общего участка
|
|
|
+ const rWidth = 20 + R * 40;
|
|
|
+ ctx.fillStyle = '#8b1a1a';
|
|
|
+ ctx.fillRect(330 - rWidth/2, h - 55, rWidth, 10);
|
|
|
+ ctx.fillStyle = '#1a2a4a';
|
|
|
+ ctx.font = '11px monospace';
|
|
|
+ ctx.fillText('R = ' + R.toFixed(2) + ' Ом', 330, h - 70);
|
|
|
+
|
|
|
+ // Падение напряжения
|
|
|
+ const drop = I * R;
|
|
|
+ ctx.fillStyle = '#8b1a1a';
|
|
|
+ ctx.font = 'bold 14px monospace';
|
|
|
+ ctx.fillText('U = I·R = ' + drop.toFixed(2) + ' В', 330, h - 85);
|
|
|
+
|
|
|
+ // Земля
|
|
|
+ ctx.fillStyle = '#1a2a4a';
|
|
|
+ ctx.fillRect(w - 120, h - 65, 40, 30);
|
|
|
+ ctx.fillStyle = '#fff';
|
|
|
+ ctx.font = '10px monospace';
|
|
|
+ ctx.fillText('земля', w - 100, h - 47);
|
|
|
+
|
|
|
+ requestAnimationFrame(render);
|
|
|
+ }
|
|
|
+ render();
|
|
|
+ }
|
|
|
+
|
|
|
+ function calcGalvanic() {
|
|
|
+ const I = parseFloat(document.getElementById('galCurrent').value);
|
|
|
+ const R = parseFloat(document.getElementById('galRes').value);
|
|
|
+ const G = parseFloat(document.getElementById('galGround').value);
|
|
|
+ if (I === 0 || R === 0) return 0;
|
|
|
+ // Плохое заземление увеличивает эффективное сопротивление
|
|
|
+ const effR = R * (1 + (100 - G) / 100);
|
|
|
+ const base = I * effR * 10; // мВ
|
|
|
+ return Math.min(base, 99.9);
|
|
|
+ }
|
|
|
+
|
|
|
+ function updateGalvanic() {
|
|
|
+ document.getElementById('galCurrentVal').textContent = document.getElementById('galCurrent').value;
|
|
|
+ document.getElementById('galResVal').textContent = parseFloat(document.getElementById('galRes').value).toFixed(2);
|
|
|
+ document.getElementById('galGroundVal').textContent = document.getElementById('galGround').value;
|
|
|
+
|
|
|
+ const val = calcGalvanic();
|
|
|
+ document.getElementById('galResult').textContent = val.toFixed(1);
|
|
|
+
|
|
|
+ const I = parseFloat(document.getElementById('galCurrent').value);
|
|
|
+ const R = parseFloat(document.getElementById('galRes').value);
|
|
|
+ const G = parseFloat(document.getElementById('galGround').value);
|
|
|
+
|
|
|
+ let msg = '';
|
|
|
+ if (I === 0) msg = 'Ток = 0 → падения напряжения нет → помехи нет.';
|
|
|
+ else if (R === 0) msg = 'Сопротивление общего участка = 0 → падения нет → помехи нет (идеальная земля).';
|
|
|
+ else {
|
|
|
+ const parts = [];
|
|
|
+ if (I >= 7) parts.push('ток большой → падение больше');
|
|
|
+ if (R >= 0.7) parts.push('сопротивление большое → падение больше');
|
|
|
+ if (G <= 30) parts.push('заземление плохое → эффективное сопротивление растёт');
|
|
|
+ if (parts.length === 0) parts.push('значения в среднем диапазоне');
|
|
|
+ msg = 'По закону Ома U = I·R: ' + parts.join(', ') + '.';
|
|
|
+ }
|
|
|
+ document.getElementById('galFeedback').textContent = msg;
|
|
|
+ }
|
|
|
+
|
|
|
+ ['galCurrent', 'galRes', 'galGround'].forEach(id => {
|
|
|
+ document.getElementById(id).addEventListener('input', updateGalvanic);
|
|
|
+ });
|
|
|
+
|
|
|
+ // === СЦЕНА 12: Тест ===
|
|
|
+ const quizData = [
|
|
|
+ {
|
|
|
+ q: 'Что является средой в электромагнитном канале?',
|
|
|
+ options: [
|
|
|
+ 'Только воздух',
|
|
|
+ 'Электрическое или магнитное поле, либо общий проводник',
|
|
|
+ 'Только вакуум'
|
|
|
+ ],
|
|
|
+ correct: 1,
|
|
|
+ explain: 'В электромагнитном канале средой может быть электрическое поле (ёмкостная связь), магнитное поле (индуктивная) или общий проводник (гальваническая). Воздух — лишь одна из возможных сред, но не единственная.'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ q: 'От чего зависит индуктивная наводка?',
|
|
|
+ options: [
|
|
|
+ 'От напряжения и сопротивления',
|
|
|
+ 'От тока, частоты, площади петли и расстояния',
|
|
|
+ 'Только от расстояния'
|
|
|
+ ],
|
|
|
+ correct: 1,
|
|
|
+ explain: 'Индуктивная наводка возникает из-за изменения магнитного потока. Поток зависит от тока, частоты, площади петли и расстояния. Напряжение здесь ни при чём — это ёмкостная наводка.'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ q: 'От чего зависит ёмкостная наводка?',
|
|
|
+ options: [
|
|
|
+ 'От тока и сопротивления',
|
|
|
+ 'От напряжения, частоты, площади и расстояния',
|
|
|
+ 'Только от тока'
|
|
|
+ ],
|
|
|
+ correct: 1,
|
|
|
+ explain: 'Ёмкостная наводка — это наведение через электрическое поле. Оно зависит от напряжения, частоты, площади и расстояния. Ток — это про магнитное поле, не про электрическое.'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ q: 'От чего зависит гальваническая наводка?',
|
|
|
+ options: [
|
|
|
+ 'От тока, сопротивления общего участка и качества заземления',
|
|
|
+ 'От напряжения и площади',
|
|
|
+ 'Только от частоты'
|
|
|
+ ],
|
|
|
+ correct: 0,
|
|
|
+ explain: 'Гальваническая наводка — это падение напряжения на общем сопротивлении по закону Ома: U = I·R. Плохое заземление увеличивает эффективное сопротивление, поэтому помеха растёт.'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ q: 'Даёт ли постоянный ток индуктивную наводку?',
|
|
|
+ options: [
|
|
|
+ 'Да, всегда',
|
|
|
+ 'Нет, потому что магнитный поток не меняется',
|
|
|
+ 'Только при большом токе'
|
|
|
+ ],
|
|
|
+ correct: 1,
|
|
|
+ explain: 'Индуктивная наводка возникает только при изменении магнитного потока (закон Фарадея: ЭДС = −dФ/dt). При постоянном токе поток постоянен, значит, ЭДС = 0. Это ключевое отличие от гальванической наводки, где постоянный ток как раз работает.'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ q: 'Экран от какого механизма помогает хуже всего?',
|
|
|
+ options: [
|
|
|
+ 'От ёмкостного',
|
|
|
+ 'От индуктивного',
|
|
|
+ 'От гальванического'
|
|
|
+ ],
|
|
|
+ correct: 2,
|
|
|
+ explain: 'Электростатический экран хорошо работает от ёмкостной наводки, частично — от индуктивной (если магнитный материал). От гальванической он почти бесполезен: помеха идёт по общему проводнику, и экран её не разрывает. Нужен разрыв цепи (оптрон, трансформатор).'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ q: 'Что общего у трёх механизмов наводок?',
|
|
|
+ options: [
|
|
|
+ 'Они все используют магнитное поле',
|
|
|
+ 'Структура канала: источник → среда → приёмник',
|
|
|
+ 'Они все подавляются одним и тем же экраном'
|
|
|
+ ],
|
|
|
+ correct: 1,
|
|
|
+ explain: 'Все три механизма — это один электромагнитный канал со структурой источник → среда → приёмник. Различается только физическая природа среды. Именно поэтому защита разная: один способ не работает одинаково против всех трёх.'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ let quizInitialized = false;
|
|
|
+ function initQuiz() {
|
|
|
+ if (quizInitialized) return;
|
|
|
+ quizInitialized = true;
|
|
|
+
|
|
|
+ const container = document.getElementById('quizContainer');
|
|
|
+ let html = '';
|
|
|
+ quizData.forEach((item, i) => {
|
|
|
+ html += `<div class="question" id="q${i}">
|
|
|
+ <div class="q-num">Вопрос ${i+1} из ${quizData.length}</div>
|
|
|
+ <div class="q-text">${item.q}</div>`;
|
|
|
+ item.options.forEach((opt, j) => {
|
|
|
+ html += `<label><input type="radio" name="q${i}" value="${j}"> ${opt}</label>`;
|
|
|
+ });
|
|
|
+ html += `<div class="explain" id="explain${i}"></div>
|
|
|
+ <div class="result-mark" id="mark${i}"></div>
|
|
|
+ </div>`;
|
|
|
+ });
|
|
|
+ html += `<div style="text-align:center; margin-top:20px;">
|
|
|
+ <button id="checkQuiz" class="primary">Проверить ответы</button>
|
|
|
+ </div>`;
|
|
|
+ container.innerHTML = html;
|
|
|
+
|
|
|
+ document.getElementById('checkQuiz').addEventListener('click', checkQuiz);
|
|
|
+ }
|
|
|
+
|
|
|
+ function checkQuiz() {
|
|
|
+ let score = 0;
|
|
|
+ quizData.forEach((item, i) => {
|
|
|
+ const selected = document.querySelector(`input[name="q${i}"]:checked`);
|
|
|
+ const questionEl = document.getElementById('q' + i);
|
|
|
+ const explainEl = document.getElementById('explain' + i);
|
|
|
+ const markEl = document.getElementById('mark' + i);
|
|
|
+
|
|
|
+ questionEl.classList.remove('correct', 'incorrect');
|
|
|
+ explainEl.classList.remove('show');
|
|
|
+ markEl.textContent = '';
|
|
|
+ markEl.className = 'result-mark';
|
|
|
+
|
|
|
+ if (!selected) {
|
|
|
+ markEl.textContent = '— Нет ответа';
|
|
|
+ markEl.classList.add('bad');
|
|
|
+ explainEl.innerHTML = '<strong>Правильный ответ:</strong> ' + item.options[item.correct] + '. ' + item.explain;
|
|
|
+ explainEl.classList.add('show');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const val = parseInt(selected.value);
|
|
|
+ if (val === item.correct) {
|
|
|
+ score++;
|
|
|
+ questionEl.classList.add('correct');
|
|
|
+ markEl.textContent = '✓ Верно';
|
|
|
+ markEl.classList.add('ok');
|
|
|
+ explainEl.innerHTML = '<strong>Пояснение:</strong> ' + item.explain;
|
|
|
+ explainEl.classList.add('show');
|
|
|
+ } else {
|
|
|
+ questionEl.classList.add('incorrect');
|
|
|
+ markEl.textContent = '✗ Неверно';
|
|
|
+ markEl.classList.add('bad');
|
|
|
+ explainEl.innerHTML = '<strong>Правильный ответ:</strong> ' + item.options[item.correct] + '. ' + item.explain;
|
|
|
+ explainEl.classList.add('show');
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ const resultEl = document.getElementById('quizResult');
|
|
|
+ const percent = Math.round((score / quizData.length) * 100);
|
|
|
+ let verdict = '';
|
|
|
+ if (score === quizData.length) verdict = 'Отлично. Материал усвоен.';
|
|
|
+ else if (score >= 5) verdict = 'Хорошо. Есть неточности, но основное понято.';
|
|
|
+ else if (score >= 3) verdict = 'Удовлетворительно. Повторите механизмы и их различия.';
|
|
|
+ else verdict = 'Неудовлетворительно. Вернитесь к сценам 8–10.';
|
|
|
+
|
|
|
+ resultEl.innerHTML = `
|
|
|
+ <div class="final-score">
|
|
|
+ <div class="num">${score}</div>
|
|
|
+ <div class="of">из ${quizData.length} (${percent}%)</div>
|
|
|
+ <div class="verdict">${verdict}</div>
|
|
|
+ </div>
|
|
|
+ `;
|
|
|
+ resultEl.style.display = 'block';
|
|
|
+
|
|
|
+ document.getElementById('finalChecklist').style.display = 'block';
|
|
|
+
|
|
|
+ resultEl.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
|
+ }
|
|
|
+
|
|
|
+ // === Инициализация первой сцены ===
|
|
|
+ showScene(0);
|
|
|
+
|
|
|
+ // Отрисовка статичных визуализаций сразу после загрузки
|
|
|
+ window.addEventListener('load', () => {
|
|
|
+ initFields();
|
|
|
+ drawWireB();
|
|
|
+ drawCapacitor();
|
|
|
+ drawInductor();
|
|
|
+ });
|
|
|
+
|
|
|
+})();
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|