{"job_id":"anim-job-4d94994d-0e5f-4707-96b0-bfa0a3920fcc","request_id":"test-physics-ohm-ba30c5e5-e5bb-4ff3-90a7-a40b2e480a51-1778708287067","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-4d94994d-0e5f-4707-96b0-bfa0a3920fcc/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-4d94994d-0e5f-4707-96b0-bfa0a3920fcc/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-4d94994d-0e5f-4707-96b0-bfa0a3920fcc/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-4d94994d-0e5f-4707-96b0-bfa0a3920fcc/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-4d94994d-0e5f-4707-96b0-bfa0a3920fcc/scene-source.json","duration_seconds":15,"byte_size":451885,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-4d94994d-0e5f-4707-96b0-bfa0a3920fcc","control_count":2,"interactivity":"none","simulation_id":"physics.10.electricity.ohms_law_vi_graph","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-4d94994d-0e5f-4707-96b0-bfa0a3920fcc","request":{"gap":{"topic":"ohm-law-vi-graph","severity":"moderate","error_type":"formula_misuse","memory_state":"fragile","display_topic":"Ohm Law V-I Graph","common_wrong_answer":"Current increases exponentially with voltage in a resistor.","confidence_at_error":"high","correct_understanding":"Current is directly proportional to voltage for fixed resistance."},"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":"Electricity","ncert_class":10,"ncert_chapter_number":12},"sub_topics":[{"topic":"Ohm Law","key_concepts":["Ohm","V I"]}]},"metadata":{"priority":"normal"},"exam_type":"neet","asset_type":"simulation","request_id":"test-physics-ohm-ba30c5e5-e5bb-4ff3-90a7-a40b2e480a51-1778708287067","subject_area":"physics"},"renderer":"html_three_js_local","storyboard":{"beats":[{"label":"Topic","visual":"Show the topic title and the key physical context.","narration":"Ohm Law V-I Graph"},{"label":"Mistake","visual":"Show the wrong approach and why it seems plausible.","narration":"Current increases exponentially with voltage in a resistor."},{"label":"Correction","visual":"Show the right approach step by step.","narration":"Current is directly proportional to voltage for fixed resistance."},{"label":"Concept","visual":"Highlight the key formula and the governing relationship.","narration":"Ohm. V I"}],"title":"Ohm Law V-I Graph","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>Ohm's Law: Linear vs. Exponential</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\",\"Inter\",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>Ohm's Law</h1>\n    <p class=\"sub\">Why current is NOT exponential</p>\n    <p class=\"formula\">V = I × R  ⟹  I = V / R</p>\n    <label class=\"control\"><span>Voltage: <strong id=\"v-voltage\">6</strong> V</span><input id=\"c-voltage\" type=\"range\" min=\"0\" max=\"12\" step=\"0.5\" value=\"6\"/></label>\n    <label class=\"control\"><span>Resistance: <strong id=\"v-resistance\">2</strong> Ω</span><input id=\"c-resistance\" type=\"range\" min=\"0.5\" max=\"10\" step=\"0.5\" value=\"2\"/></label>\n    <ul>\n      <li><strong>✗ Misconception:</strong> I ∝ e^V (exponential)</li>\n      <li><strong>✓ Correct:</strong> I ∝ V (linear)</li>\n      <li><strong>Why?</strong> Resistance is constant—each volt adds the same current.</li>\n      <li><strong>Real law:</strong> Ohm's Law holds for ohmic materials in normal ranges.</li>\n    </ul>\n  </aside>\n  <section>\n    <div class=\"stage\" id=\"stage\">\n      <div class=\"legend\" id=\"legend\">Ohm's Law Visualization</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 = [\n  {\"key\":\"voltage\",\"label\":\"Voltage\",\"min\":0,\"max\":12,\"step\":0.5,\"value\":6,\"units\":\"V\"},\n  {\"key\":\"resistance\",\"label\":\"Resistance\",\"min\":0.5,\"max\":10,\"step\":0.5,\"value\":2,\"units\":\"Ω\"}\n];\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  \n  let lastTs=0;\n  let elapsedGlobal=0;\n  \n  // State: particles flowing to show current\n  let linearTrail=[];\n  let exponentialTrail=[];\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 trail(points,color){\n    if(points.length<2)return;\n    ctx.strokeStyle=color;ctx.lineWidth=2.5;ctx.globalAlpha=0.5;\n    ctx.beginPath();ctx.moveTo(points[0].x,points[0].y);\n    for(let i=1;i<points.length;i++)ctx.lineTo(points[i].x,points[i].y);\n    ctx.stroke();ctx.globalAlpha=1;\n  }\n  \n  function arrow(x1,y1,x2,y2,color){\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;ctx.lineWidth=2.5;\n    ctx.beginPath();ctx.moveTo(x1,y1);ctx.lineTo(x2,y2);ctx.stroke();\n    ctx.fillStyle=color;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 tick(ts){\n    const dt=Math.min(0.04,(ts-lastTs)/1000);lastTs=ts;\n    elapsedGlobal+=dt;\n    const W=cv.width,H=cv.height;\n    \n    // Read sliders\n    const V=Number(document.getElementById('c-voltage').value);\n    const R=Number(document.getElementById('c-resistance').value);\n    \n    // Calculate actual current (Ohm's Law)\n    const I_actual=V/R;\n    \n    // Calculate exponential misconception\n    const I_wrong=0.8*(Math.exp(V/3)-1);\n    \n    // Keep trail history (max 80 points)\n    if(elapsedGlobal%0.05<0.016){\n      const yLinear=H*0.7-I_actual*40;\n      const yExpo=H*0.7-Math.min(I_wrong*40,H*0.5);\n      if(linearTrail.length>80)linearTrail.shift();\n      if(exponentialTrail.length>80)exponentialTrail.shift();\n      linearTrail.push({x:W*0.15+elapsedGlobal*80,y:yLinear});\n      exponentialTrail.push({x:W*0.15+elapsedGlobal*80,y:yExpo});\n    }\n    \n    // Clamp trail x to visible range\n    linearTrail=linearTrail.filter(p=>p.x>W*0.1);\n    exponentialTrail=exponentialTrail.filter(p=>p.x>W*0.1);\n    \n    // Clear canvas\n    ctx.clearRect(0,0,W,H);\n    \n    // === Background grid and axes ===\n    ctx.strokeStyle='rgba(200,212,218,0.08)';ctx.lineWidth=1;\n    for(let i=1;i<10;i++){\n      const y=H*0.15+i*H*0.07;\n      ctx.beginPath();ctx.moveTo(W*0.1,y);ctx.lineTo(W*0.85,y);ctx.stroke();\n    }\n    \n    // === Left circuit diagram area ===\n    // Battery symbol\n    ctx.strokeStyle='#c8d4da';ctx.lineWidth=2;\n    ctx.fillStyle='rgba(200,212,218,0.15)';\n    ctx.fillRect(W*0.05,H*0.1,W*0.15,H*0.35);\n    ctx.strokeRect(W*0.05,H*0.1,W*0.15,H*0.35);\n    ctx.fillStyle='#c8d4da';ctx.font=Math.round(H*0.035)+'px sans-serif';\n    ctx.textAlign='center';\n    ctx.fillText('Battery',W*0.125,H*0.18);\n    ctx.fillText('V='+V.toFixed(1)+'V',W*0.125,H*0.28);\n    ctx.fillText('R='+R.toFixed(1)+'Ω',W*0.125,H*0.38);\n    \n    // === Top graph: LINEAR (Correct) ===\n    const gx1=W*0.15,gy1=H*0.12,gw=W*0.35,gh=H*0.25;\n    \n    // Frame\n    ctx.strokeStyle='#63b3ff';ctx.lineWidth=2;ctx.globalAlpha=0.6;\n    ctx.strokeRect(gx1,gy1,gw,gh);ctx.globalAlpha=1;\n    \n    // Axes\n    ctx.strokeStyle='#87e8a8';ctx.lineWidth=1.5;\n    ctx.beginPath();ctx.moveTo(gx1+20,gy1+gh-20);ctx.lineTo(gx1+gw,gy1+gh-20);ctx.stroke();\n    ctx.beginPath();ctx.moveTo(gx1+20,gy1+gh-20);ctx.lineTo(gx1+20,gy1);ctx.stroke();\n    \n    // Label\n    ctx.fillStyle='#87e8a8';ctx.font='bold '+Math.round(H*0.032)+'px sans-serif';\n    ctx.textAlign='left';ctx.fillText('✓ LINEAR (Correct)',gx1+30,gy1+15);\n    \n    // Draw line V=0..12\n    ctx.strokeStyle='#87e8a8';ctx.lineWidth=3;ctx.beginPath();\n    for(let v=0;v<=12;v+=0.2){\n      const i=v/R;\n      const px=gx1+20+(v/12)*(gw-40);\n      const py=gy1+gh-20-Math.min(i/6,1)*(gh-40);\n      if(v===0)ctx.moveTo(px,py);\n      else ctx.lineTo(px,py);\n    }ctx.stroke();\n    \n    // Current point\n    const cxLin=gx1+20+(V/12)*(gw-40);\n    const cyLin=gy1+gh-20-Math.min(I_actual/6,1)*(gh-40);\n    glowDot(cxLin,cyLin,6,'rgba(135,232,168,ALPHA)',0.8);\n    ctx.fillStyle='#87e8a8';ctx.beginPath();ctx.arc(cxLin,cyLin,4,0,Math.PI*2);ctx.fill();\n    \n    // Axes labels\n    ctx.fillStyle='#c8d4da';ctx.font=Math.round(H*0.025)+'px sans-serif';ctx.textAlign='center';\n    ctx.fillText('V(volts)',gx1+gw/2,gy1+gh+12);\n    ctx.save();ctx.translate(gx1-8,gy1+gh/2);ctx.rotate(-Math.PI/2);ctx.fillText('I(A)');ctx.restore();\n    \n    // Formula overlay\n    ctx.fillStyle='#e5ba67';ctx.font=Math.round(H*0.028)+'px monospace';ctx.textAlign='left';\n    ctx.fillText('I = V/R',gx1+30,gy1+gh-5);\n    \n    // === Bottom graph: EXPONENTIAL (Wrong) ===\n    const gx2=W*0.15,gy2=gy1+gh+H*0.08,gw2=W*0.35,gh2=H*0.25;\n    \n    // Frame\n    ctx.strokeStyle='#de7f76';ctx.lineWidth=2;ctx.globalAlpha=0.6;\n    ctx.strokeRect(gx2,gy2,gw2,gh2);ctx.globalAlpha=1;\n    \n    // Axes\n    ctx.strokeStyle='#de7f76';ctx.lineWidth=1.5;\n    ctx.beginPath();ctx.moveTo(gx2+20,gy2+gh2-20);ctx.lineTo(gx2+gw2,gy2+gh2-20);ctx.stroke();\n    ctx.beginPath();ctx.moveTo(gx2+20,gy2+gh2-20);ctx.lineTo(gx2+20,gy2);ctx.stroke();\n    \n    // Label\n    ctx.fillStyle='#de7f76';ctx.font='bold '+Math.round(H*0.032)+'px sans-serif';\n    ctx.textAlign='left';ctx.fillText('✗ EXPONENTIAL (Wrong)',gx2+30,gy2+15);\n    \n    // Draw wrong curve I = 0.8*(e^(V/3)-1)\n    ctx.strokeStyle='#de7f76';ctx.lineWidth=3;ctx.beginPath();\n    for(let","remediationGoal":"Close formula_misuse for physics."},"rendererStyle":"three_js"},"simulation_title":"Ohm's Law (V-I Graph)"}},"metadata":{"rendered_at":"2026-05-13T21:46:01.880Z","cache_hit":false,"cost_usd":0},"error":null}