{"job_id":"anim-job-9a16fe0f-0ffd-4b3e-9b11-dd26fd0be3aa","request_id":"test-physics-induction-fef4a9a4-ee3c-4109-9b59-ca80c158fc36-1778702709883","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-9a16fe0f-0ffd-4b3e-9b11-dd26fd0be3aa/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-9a16fe0f-0ffd-4b3e-9b11-dd26fd0be3aa/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-9a16fe0f-0ffd-4b3e-9b11-dd26fd0be3aa/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-9a16fe0f-0ffd-4b3e-9b11-dd26fd0be3aa/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-9a16fe0f-0ffd-4b3e-9b11-dd26fd0be3aa/scene-source.json","duration_seconds":15,"byte_size":253909,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-9a16fe0f-0ffd-4b3e-9b11-dd26fd0be3aa","control_count":2,"interactivity":"none","simulation_id":"physics.10.magnetic_effects.electromagnetic_induction","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-9a16fe0f-0ffd-4b3e-9b11-dd26fd0be3aa","request":{"gap":{"topic":"em-induction-flux","severity":"dangerous","error_type":"concept_misunderstanding","memory_state":"fragile","display_topic":"Electromagnetic Induction","common_wrong_answer":"A static magnet always induces current in a nearby coil.","confidence_at_error":"high","correct_understanding":"Induced emf appears only when magnetic flux through coil changes."},"target":{"style":"auto","render":{"fps":30,"format":"mp4","resolution":"1920x1080","include_thumbnail":true,"include_transcript":true},"audience":{"tone":"neutral_instructional","grade":"10","language":"en"},"interactivity":"none","duration_seconds":15},"context":{"chapter":{"name":"Magnetic Effects","ncert_class":10,"ncert_chapter_number":13},"sub_topics":[{"topic":"Electromagnetic Induction","key_concepts":["induction","flux change"]}]},"metadata":{"priority":"normal"},"exam_type":"neet","asset_type":"simulation","request_id":"test-physics-induction-fef4a9a4-ee3c-4109-9b59-ca80c158fc36-1778702709883","subject_area":"physics"},"renderer":"html_three_js_local","storyboard":{"beats":[{"label":"Topic","visual":"Show the topic title and the key physical context.","narration":"Electromagnetic Induction"},{"label":"Mistake","visual":"Show the wrong approach and why it seems plausible.","narration":"A static magnet always induces current in a nearby coil."},{"label":"Correction","visual":"Show the right approach step by step.","narration":"Induced emf appears only when magnetic flux through coil changes."},{"label":"Concept","visual":"Highlight the key formula and the governing relationship.","narration":"induction. flux change"}],"title":"Electromagnetic Induction","sceneCode":"<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\"/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>\n  <title>Electromagnetic Induction: Flux Change Requirement</title>\n  <style>\n    :root{--bg:#0f1418;--panel:#182228;--line:#2e3e46;--accent:#e5ba67;--text:#f4f1ea;--muted:#c8d4da;--blue:#63b3ff;--green:#87e8a8;--red:#de7f76;}\n    *{box-sizing:border-box;}\n    body{margin:0;font-family:\"Plus Jakarta Sans\",\"Manrope\",ui-sans-serif,system-ui,sans-serif;background:radial-gradient(120% 90% at 20% -5%,#24343d 0%,var(--bg) 55%);color:var(--text);}\n    main{min-height:100vh;display:grid;grid-template-columns:minmax(300px,380px) 1fr;}\n    aside{border-right:1px solid var(--line);background:linear-gradient(180deg,rgba(31,46,53,.86),rgba(24,34,40,.92));padding:24px;overflow:auto;backdrop-filter:blur(6px);}\n    section{padding:24px;display:grid;place-items:center;}\n    h1{margin:0 0 10px;font-size:1.65rem;line-height:1.15;}\n    .sub{margin:0 0 16px;color:var(--muted);}\n    .formula{margin:0 0 14px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#11191e;color:var(--accent);font-family:ui-monospace,monospace;font-size:0.9rem;box-shadow:inset 0 0 28px rgba(229,186,103,.08);}\n    .control{display:grid;gap:6px;margin:12px 0;}\n    .control input{width:100%;accent-color:var(--accent);}\n    ul{margin:14px 0 0 18px;padding:0;color:var(--muted);display:grid;gap:6px;}\n    .stage{width:min(1020px,95%);aspect-ratio:16/9;border:1px solid #445862;border-radius:14px;position:relative;overflow:hidden;background:radial-gradient(circle at 50% 38%,#2f4a57,#0f1418 72%);box-shadow:0 18px 60px rgba(0,0,0,.45), inset 0 0 90px rgba(255,255,255,.03);}\n    .stage::before{content:\"\";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.06),transparent 34%);pointer-events:none;}\n    .legend{position:absolute;right:12px;top:12px;padding:8px 10px;border-radius:10px;border:1px solid #465a64;background:rgba(9,14,18,.58);font-size:0.8rem;color:var(--muted);backdrop-filter:blur(4px);}\n    @media(max-width:900px){main{grid-template-columns:1fr;}aside{border-right:0;border-bottom:1px solid var(--line);}}\n  </style>\n</head>\n<body>\n<main>\n  <aside>\n    <h1>Electromagnetic Induction</h1>\n    <p class=\"sub\">Flux Change = Current. No Change = No Current.</p>\n    <p class=\"formula\">ε = −dΦ_B/dt</p>\n    <label class=\"control\"><span>Magnet Speed: <strong id=\"v-speed\">1.0</strong> units/s</span><input id=\"c-speed\" type=\"range\" min=\"0\" max=\"3\" step=\"0.1\" value=\"1.0\"/></label>\n    <label class=\"control\"><span>Coil Resistance: <strong id=\"v-resist\">10</strong> Ω</span><input id=\"c-resist\" type=\"range\" min=\"1\" max=\"50\" step=\"1\" value=\"10\"/></label>\n    <ul>\n      <li><strong style=\"color:var(--accent);\">❌ Mistake:</strong> Static magnet → instant current</li>\n      <li><strong style=\"color:var(--green);\">✓ Truth:</strong> Only <em>changing</em> flux induces EMF</li>\n      <li>Watch: Moving magnet (flux changes) vs static magnet (no change)</li>\n      <li>Current appears only during motion, vanishes when stopped</li>\n    </ul>\n  </aside>\n  <section>\n    <div class=\"stage\" id=\"stage\">\n      <div class=\"legend\" id=\"legend\">Ready</div>\n      <canvas id=\"sim-cv\" style=\"position:absolute;inset:0;width:100%;height:100%;\"></canvas>\n    </div>\n  </section>\n</main>\n<script>\nconst controls = [{\"key\":\"speed\",\"label\":\"Magnet Speed\",\"min\":0,\"max\":3,\"step\":0.1,\"value\":1.0,\"units\":\"units/s\"},{\"key\":\"resist\",\"label\":\"Coil Resistance\",\"min\":1,\"max\":50,\"step\":1,\"value\":10,\"units\":\"Ω\"}];\nfor(const c of controls){\n  const inp=document.getElementById('c-'+c.key);\n  const out=document.getElementById('v-'+c.key);\n  inp?.addEventListener('input',()=>{out.textContent=inp.value;window.updateModel?.();});\n}\n(function(){\n  const cv=document.getElementById('sim-cv');\n  const ctx=cv.getContext('2d');\n  function resize(){const r=cv.getBoundingClientRect();if(r.width>0){cv.width=r.width;cv.height=r.height;}}\n  resize();new ResizeObserver(resize).observe(cv);\n  let lastTs=0;\n  \n  // State variables\n  let magnetX = 0;\n  let coilX = 0.5;\n  let fluxHistory = [];\n  let currentHistory = [];\n  let eofHistory = [];\n  let phaseTime = 0;\n  let phase = 0; // 0: moving right, 1: static, 2: moving left\n  let phaseDuration = 15; // 15 seconds total\n  \n  function glowDot(x, y, r, color, a) {\n    const g = ctx.createRadialGradient(x, y, 0, x, y, r * 2.6);\n    g.addColorStop(0, color.replace('ALPHA', String(a)));\n    g.addColorStop(1, color.replace('ALPHA', '0'));\n    ctx.fillStyle = g;\n    ctx.beginPath();\n    ctx.arc(x, y, r * 2.6, 0, Math.PI * 2);\n    ctx.fill();\n  }\n  \n  function arrow(x1, y1, x2, y2, color, thickness = 2) {\n    const dx = x2 - x1, dy = y2 - y1, l = Math.sqrt(dx * dx + dy * dy);\n    if (l < 2) return;\n    const nx = dx / l, ny = dy / l, s = 12;\n    ctx.strokeStyle = color;\n    ctx.lineWidth = thickness;\n    ctx.beginPath();\n    ctx.moveTo(x1, y1);\n    ctx.lineTo(x2, y2);\n    ctx.stroke();\n    ctx.fillStyle = color;\n    ctx.beginPath();\n    ctx.moveTo(x2, y2);\n    ctx.lineTo(x2 - s * nx + s * 0.4 * ny, y2 - s * ny - s * 0.4 * nx);\n    ctx.lineTo(x2 - s * nx - s * 0.4 * ny, y2 - s * ny + s * 0.4 * nx);\n    ctx.fill();\n  }\n  \n  function drawCoil(x, y, r, current, label) {\n    const rings = 5;\n    const ringGap = r / rings;\n    ctx.strokeStyle = '#63b3ff';\n    ctx.lineWidth = 2;\n    for (let i = 0; i < rings; i++) {\n      const rr = r - i * ringGap;\n      ctx.beginPath();\n      ctx.arc(x, y, rr, 0, Math.PI * 2);\n      ctx.stroke();\n    }\n    \n    // Current glow if nonzero\n    if (Math.abs(current) > 0.1) {\n      ctx.fillStyle = 'rgba(135, 232, 168, ' + (Math.abs(current) * 0.25) + ')';\n      ctx.beginPath();\n      ctx.arc(x, y, r + 8, 0, Math.PI * 2);\n      ctx.fill();\n      glowDot(x, y, r + 12, 'rgba(135, 232, 168, ALPHA)', Math.abs(current) * 0.15);\n    }\n    \n    ctx.fillStyle = '#f4f1ea';\n    ctx.font = Math.round(cv.height * 0.045) + 'px sans-serif';\n    ctx.textAlign = 'center';\n    ctx.textBaseline = 'middle';\n    ctx.fillText(label, x, y - r - 20);\n  }\n  \n  function drawMagnet(x, y, w, h, polarityLabel, moving) {\n    // North pole (red)\n    ctx.fillStyle = '#de7f76';\n    ctx.fillRect(x - w / 2, y - h / 2, w / 2, h);\n    ctx.fillStyle = '#f4f1ea';\n    ctx.font = Math.round(cv.height * 0.06) + 'px sans-serif';\n    ctx.textAlign = 'center';\n    ctx.textBaseline = 'middle';\n    ctx.fillText('N', x - w / 4, y);\n    \n    // South pole (blue)\n    ctx.fillStyle = '#63b3ff';\n    ctx.fillRect(x, y - h / 2, w / 2, h);\n    ctx.fillStyle = '#f4f1ea';\n    ctx.fillText('S', x + w / 4, y);\n    \n    // Motion indicator\n    if (moving) {\n      ctx.strokeStyle = '#87e8a8';\n      ctx.lineWidth = 2;\n      ctx.setLineDash([4, 4]);\n      ctx.beginPath();\n      ctx.arc(x, y, w / 2 + 12, 0, Math.PI * 2);\n      ctx.stroke();\n      ctx.setLineDash([]);\n    }\n  }\n  \n  function tick(ts) {\n    const dt = Math.min(0.04, (ts - lastTs) / 1000);\n    lastTs = ts;\n    const W = cv.width, H = cv.height;\n    \n    // Read sliders\n    const speed = Number(document.getElementById('c-speed').value);\n    const resistance = Number(document.getElementById('c-resist').value);\n    \n    // Simulation phases (15s total)\n    phaseTime += dt;\n    if (phaseTime < 5) {\n      phase = 0; // Moving right\n      magnetX += speed * dt;\n    } else if (phaseTime < 10) {\n      phase = 1; // Static\n    } else if (phaseTime < 15) {\n      phase = 2; // Moving left\n      magnetX -= speed * dt;\n    } else {\n      phaseTime = 0;\n      magnetX = 0;\n    }\n    \n    coilX = 0.5;\n    \n    // Compute flux (Gaussian-like field strength based on distance)\n    const dx = magnetX - coilX;\n    const distSq = dx * dx + 0.01;\n    const flux = 100 / (distSq + 1);\n    \n    // Compute dΦ/dt (numerical differentiation)\n    fluxHistory.push(flux);\n    if (fluxHistory.length > 2) fluxHistory.shift();\n    \n    let dFluxDt = 0;\n    if (fluxHistory.length === 2) {\n      dFluxDt = (fluxHistory[1] - fluxHistory[0]) / dt;\n    }\n    \n    // EMF = -dΦ/dt (Faraday's law)\n    const emf = -dFluxDt;\n    \n    // Current = EMF / R\n    const current = emf / resistance;\n    \n    // Store history for graphing\n    eofHistory.push(emf);\n    currentHistory.push(current);\n    if (eofHistory.length > 80) {\n      eofHistory.shift();\n      currentHistory.shift();\n    }\n    \n    // Draw\n    ctx.clearRect(0, 0, W, H);\n    \n    // Background grid\n    ctx.strokeStyle = 'rgba(46, 62, 70, 0.3)';\n    ctx.lineWidth = 0.5;\n    const gridStep = W / 10;\n    for (let i = 0; i <= 10; i++) {\n      ctx.beginPath();\n      ctx.moveTo(i * gridStep, 0);\n      ctx.lineTo(i * gridStep, H);\n      ctx.stroke();\n    }\n    \n    // Top section: Magnet and Coil positions (0-45% of height)\n    const topH = H * 0.45;\n    const magnetWorldX = magnetX * (W * 0.6) + W * 0.2;\n    const coilWorldX = coilX * (W * 0.6) + W * 0.2;\n    \n    // Draw magnet\n    const magnetMoving = (phase === 0 || phase === 2);\n    drawMagnet(magnetWorldX, topH * 0.5, W * 0.08, H * 0.12, '', magnetMoving);\n    \n    // Draw coil\n    drawCoil(coilWorldX, topH * 0.5, H * 0.08, current, 'Coil');\n    \n    // Draw flux field lines\n    const fieldLineCount = 8;\n    for (let i = 0; i < fieldLineCount; i++) {\n      const angle = (i / fieldLineCount) * Math.PI * 2;\n      const startX = magnetWorldX + Math.cos(angle) * W * 0.06;\n      const startY = topH * 0.5 + Math.sin(angle) * H * 0.08;\n      const endX = magnetWorldX + Math.cos(angle) * W * 0.15;\n      const endY = topH * 0.5 + Math.sin(angle) * H * 0.2;\n      \n      ctx.strokeStyle = 'rgba(229, 186, 103, 0.4)';\n      ctx.lineWidth = 1.5;\n      ctx.beginPath();\n      ctx.moveTo(startX, startY);\n      ctx.lineTo(endX, endY);\n      ctx.stroke();\n    }\n    \n    // Middle section: Flux graph (45%-65%)\n    const graphTop = H * 0.48;\n    const graphBot = H * 0.68;\n    const graphH = graphBot - graphTop;\n    const graphL = W * 0.15;\n    const graphR = W * 0.85;\n    const graphW = graphR - graphL;\n    \n    ctx.strokeStyle = 'rgba(68, 88, 98, 0.8)';\n    ctx.lineWidth = 1;\n    ctx.strokeRect(graphL, graphTop, graphW, graphH);\n    \n    ctx.fillStyle = 'rgba(68, 88, 98, 0.2)';\n    ctx.fillRect(graphL, graphTop, graphW","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"},"simulation_title":"Electromagnetic Induction"}},"metadata":{"rendered_at":"2026-05-13T20:11:03.262Z","cache_hit":false,"cost_usd":0},"error":null}