{"job_id":"anim-job-ed741e43-852d-4779-9609-1fa43e17ead8","request_id":"bulk-2026-05-20T10-21-44-856Z-13-physics.10.magnetism.field-around-wire","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-ed741e43-852d-4779-9609-1fa43e17ead8/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-ed741e43-852d-4779-9609-1fa43e17ead8/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-ed741e43-852d-4779-9609-1fa43e17ead8/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-ed741e43-852d-4779-9609-1fa43e17ead8/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-ed741e43-852d-4779-9609-1fa43e17ead8/scene-source.json","duration_seconds":15,"byte_size":472501,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-ed741e43-852d-4779-9609-1fa43e17ead8","interactivity":"none","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-ed741e43-852d-4779-9609-1fa43e17ead8","request":{"gap":{"topic":"magnetism-field_around_wire","severity":"moderate","error_type":"concept_misunderstanding","memory_state":"fragile","display_topic":"Magnetic Field Around a Wire","common_wrong_answer":"The concept works the same way in all conditions.","confidence_at_error":"high","correct_understanding":"The concept depends on constraints, assumptions, and variable relationships."},"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},"sub_topics":[{"topic":"magnetism-field_around_wire","key_concepts":["Magnetic Field Around a Wire","Magnetic Effects"]}]},"metadata":{"priority":"normal","trace_id":"bulk-run-2026-05-20T10-21-44-856Z"},"exam_type":"neet","asset_type":"simulation","request_id":"bulk-2026-05-20T10-21-44-856Z-13-physics.10.magnetism.field-around-wire","subject_area":"physics"},"renderer":"html_three_js_local","storyboard":{"beats":[{"label":"Topic","visual":"Show the topic title and the key physical context.","narration":"Magnetic Field Around a Wire"},{"label":"Mistake","visual":"Show the wrong approach and why it seems plausible.","narration":"The concept works the same way in all conditions."},{"label":"Correction","visual":"Show the right approach step by step.","narration":"The concept depends on constraints, assumptions, and variable relationships."},{"label":"Concept","visual":"Highlight the key formula and the governing relationship.","narration":"Magnetic Field Around a Wire. Magnetic Effects"}],"title":"Magnetic Field Around a Wire","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>Magnetic Field Around a Wire</title>\n  <style>\n    :root{--bg:#0e121a;--panel:#1c232e;--line:#303449;--accent:#fc884f;--text:#faf9f8;--muted:#9f9ea1;--blue:#627da5;--green:#8decb0;--red:#df8279;}\n    *{box-sizing:border-box;}\n    body{margin:0;font-family:\"Plus Jakarta Sans\",\"Manrope\",\"Inter\",ui-sans-serif,system-ui,sans-serif;background:radial-gradient(120% 90% at 20% -5%,#1c232e 0%,#0e121a 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(28,35,46,.86),rgba(14,18,26,.94));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>Magnetic Field Around a Wire</h1>\n    <p class=\"sub\">Why the field doesn't work the same in all conditions</p>\n    <p class=\"formula\">B = μ₀I/(2πr)</p>\n    <label class=\"control\"><span>Current: <strong id=\"v-current\">5.0</strong> A</span><input id=\"c-current\" type=\"range\" min=\"1\" max=\"15\" step=\"0.5\" value=\"5.0\"/></label>\n    <label class=\"control\"><span>Distance: <strong id=\"v-distance\">3.0</strong> cm</span><input id=\"c-distance\" type=\"range\" min=\"1\" max=\"8\" step=\"0.5\" value=\"3.0\"/></label>\n    <label class=\"control\"><span>Medium: <strong id=\"v-medium\">Vacuum</strong></span><input id=\"c-medium\" type=\"range\" min=\"0\" max=\"2\" step=\"1\" value=\"0\"/></label>\n    <ul>\n      <li><strong>❌ Misconception:</strong> Field strength always decreases the same way.</li>\n      <li><strong>✓ Reality:</strong> Field depends on current, distance, and medium.</li>\n      <li><strong>🔑 Key:</strong> 1/r relationship shows distance dramatically affects B.</li>\n      <li><strong>📊 Watch:</strong> Change each variable—see immediate effect on field pattern.</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\":\"current\",\"label\":\"Current\",\"min\":1,\"max\":15,\"step\":0.5,\"value\":5.0,\"units\":\"A\"},{\"key\":\"distance\",\"label\":\"Distance\",\"min\":1,\"max\":8,\"step\":0.5,\"value\":3.0,\"units\":\"cm\"},{\"key\":\"medium\",\"label\":\"Medium\",\"min\":0,\"max\":2,\"step\":1,\"value\":0,\"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',()=>{\n    if(c.key==='medium'){\n      const meds=['Vacuum','Iron','Copper'];\n      out.textContent=meds[parseInt(inp.value)];\n    }else{\n      out.textContent=inp.value;\n    }\n    window.updateModel?.();\n  });\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  const mediumNames=['Vacuum','Iron','Copper'];\n  const muRelative=[1,5000,1];\n  \n  // State: time, phase, field values at sample radii\n  let time=0;\n  let fieldValues=[];\n  let trailPoints=[];\n  let pulsePhase=0;\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;ctx.beginPath();ctx.arc(x,y,r*2.6,0,Math.PI*2);ctx.fill();\n  }\n  \n  function arrow(x1,y1,x2,y2,color,width=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=8;\n    ctx.strokeStyle=color;ctx.lineWidth=width;ctx.beginPath();ctx.moveTo(x1,y1);ctx.lineTo(x2,y2);ctx.stroke();\n    ctx.fillStyle=color;ctx.beginPath();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 tick(ts){\n    const dt=Math.min(0.04,(ts-lastTs)/1000);lastTs=ts;\n    const W=cv.width,H=cv.height;\n    \n    // Read sliders\n    const current=parseFloat(document.getElementById('c-current').value);\n    const distance=parseFloat(document.getElementById('c-distance').value);\n    const mediumIdx=parseInt(document.getElementById('c-medium').value);\n    const mu=muRelative[mediumIdx];\n    \n    // Update time\n    time+=dt;\n    pulsePhase=(time*2)%1;\n    \n    // Calculate field strength (B = μ₀*μ_r*I/(2πr))\n    const r_meter=distance*0.01;\n    const mu0=1.26e-6;\n    const B=(mu0*mu*current)/(2*Math.PI*r_meter);\n    \n    // Clear canvas\n    ctx.fillStyle='#0f1418';\n    ctx.fillRect(0,0,W,H);\n    \n    // Draw subtle grid\n    ctx.strokeStyle='#2a3a45';\n    ctx.lineWidth=1;\n    ctx.globalAlpha=0.15;\n    const gridSize=W/8;\n    for(let x=0;x<=W;x+=gridSize){\n      ctx.beginPath();ctx.moveTo(x,0);ctx.lineTo(x,H);ctx.stroke();\n    }\n    for(let y=0;y<=H;y+=gridSize){\n      ctx.beginPath();ctx.moveTo(0,y);ctx.lineTo(W,y);ctx.stroke();\n    }\n    ctx.globalAlpha=1;\n    \n    // Wire position (vertical, center-left)\n    const wireX=W*0.25;\n    const wireY=H*0.5;\n    \n    // Draw wire (cross-section, showing current direction)\n    ctx.fillStyle='#e0a040';\n    ctx.beginPath();ctx.arc(wireX,wireY,6,0,Math.PI*2);ctx.fill();\n    ctx.strokeStyle='#fc884f';\n    ctx.lineWidth=2;\n    ctx.beginPath();ctx.arc(wireX,wireY,6,0,Math.PI*2);ctx.stroke();\n    \n    // Draw \"current out of page\" symbol (dot and circle)\n    ctx.fillStyle='#8decb0';\n    ctx.fillRect(wireX-2,wireY-2,4,4);\n    \n    // Draw magnetic field circles (Ampere's law visualization)\n    const numCircles=4;\n    for(let i=1;i<=numCircles;i++){\n      const radius=15+i*20;\n      const fieldStrength=B/(i*0.5);\n      const hue=Math.max(20,Math.min(60,fieldStrength*5));\n      const alpha=Math.max(0.1,0.6-i*0.12);\n      \n      ctx.strokeStyle='rgba(252,136,79,'+alpha+')';\n      ctx.lineWidth=1.5;\n      ctx.beginPath();ctx.arc(wireX,wireY,radius,0,Math.PI*2);ctx.stroke();\n    }\n    \n    // Draw field lines (tangential to circles) at key points\n    const angles=8;\n    for(let i=1;i<=3;i++){\n      const radius=20+i*25;\n      for(let a=0;a<angles;a++){\n        const angle=(a/angles)*Math.PI*2;\n        const x=wireX+radius*Math.cos(angle);\n        const y=wireY+radius*Math.sin(angle);\n        \n        // Tangent direction (perpendicular to radius)\n        const tx=-Math.sin(angle);\n        const ty=Math.cos(angle);\n        const len=8;\n        \n        const fieldStrength=B/(i*0.5);\n        const alpha=Math.max(0.15,Math.min(0.7,(fieldStrength+1)*0.3));\n        \n        ctx.strokeStyle='rgba(220,100,120,'+alpha+')';\n        ctx.lineWidth=1.5;\n        ctx.beginPath();\n        ctx.moveTo(x-tx*len/2,y-ty*len/2);\n        ctx.lineTo(x+tx*len/2,y+ty*len/2);\n        ctx.stroke();\n        \n        // Arrowhead\n        const s=4;\n        ctx.fillStyle='rgba(220,100,120,'+alpha+')';\n        ctx.beginPath();\n        ctx.moveTo(x+tx*len/2,y+ty*len/2);\n        ctx.lineTo(x+tx*len/2-s*0.7*Math.cos(angle)-s*0.3*Math.sin(angle),y+ty*len/2-s*0.7*Math.sin(angle)+s*0.3*Math.cos(angle));\n        ctx.lineTo(x+tx*len/2-s*0.7*Math.cos(angle)+s*0.3*Math.sin(angle),y+ty*len/2-s*0.7*Math.sin(angle)-s*0.3*Math.cos(angle));\n        ctx.fill();\n      }\n    }\n    \n    // Pulsing glow at wire\n    const pulseGlow=Math.sin(pulsePhase*Math.PI*2)*0.3+0.4;\n    glowDot(wireX,wireY,12,'rgba(252,136,79,ALPHA)',pulseGlow*0.5);\n    \n    // Draw measurement arrow and distance indicator\n    const probeX=wireX+distance*12;\n    const probeY=wireY;\n    \n    ctx.strokeStyle='#627da5';\n    ctx.lineWidth=1;\n    ctx.setLineDash([4,3]);\n    ctx.beginPath();ctx.moveTo(wireX,wireY-30);ctx.lineTo(probeX,wireY-30);ctx.stroke();\n    ctx.setLineDash([]);\n    \n    arrow(wireX,wireY-30,probeX,wireY-30,'#627da5',1.5);\n    \n    // Distance label\n    ctx.fillStyle='var(--text)';\n    ctx.font=Math.round(H*0.04)+'px sans-serif';\n    ctx.textAlign='center';\n    ctx.fillStyle='#627da5';\n    ctx.fillText(distance.toFixed(1)+' cm',wireX+(probeX-wireX)/2,wireY-40);\n    \n    // Draw probe point\n    ctx.fillStyle='#8decb0';\n    ctx.beginPath();ctx.arc(probeX,probeY,4,0,Math.PI*2);ctx.fill();\n    ctx.strokeStyle='#8decb0';\n    ctx.lineWidth=2;\n    ctx.beginPath();ctx.arc(probeX,probeY,4,0,Math.PI*2);ctx.stroke();\n    \n    // Data display panel (bottom-right)\n    ctx.fillStyle='rgba(28,35,46,0.7)';\n    ctx.strokeStyle='#445862';\n    ctx.lineWidth=1;\n    ctx.beginPath();ctx.roundRect?ctx.roundRect(W-220,H-140,200,120,6):ctx.rect(W-220,H-140,200,120);ctx.fill();ctx.stroke();\n    \n    ctx.fillStyle='#fc884f';\n    ctx.font='bold '+Math.round(H*0.035)+'px sans-serif';\n    ctx.textAlign='left';\n    ctx.fillText('Field Strength',W-210,H-115);\n    \n    ctx.fillStyle='#faf9f8';\n    ctx.font=Math.round(H*0","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"}}},"metadata":{"rendered_at":"2026-05-20T11:17:12.703Z","cache_hit":false,"cost_usd":0},"error":null}