{"job_id":"anim-job-84696a7f-8112-4255-a182-e9f0ef39e5ed","request_id":"bulk-2026-05-20T10-21-44-856Z-11-physics.10.electricity.ohms-law-vi-graph","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-84696a7f-8112-4255-a182-e9f0ef39e5ed/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-84696a7f-8112-4255-a182-e9f0ef39e5ed/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-84696a7f-8112-4255-a182-e9f0ef39e5ed/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-84696a7f-8112-4255-a182-e9f0ef39e5ed/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-84696a7f-8112-4255-a182-e9f0ef39e5ed/scene-source.json","duration_seconds":15,"byte_size":456646,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-84696a7f-8112-4255-a182-e9f0ef39e5ed","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-84696a7f-8112-4255-a182-e9f0ef39e5ed","request":{"gap":{"topic":"ohm-law-vi-graph","severity":"moderate","error_type":"formula_misuse","memory_state":"fragile","display_topic":"Ohm's 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},"sub_topics":[{"topic":"ohm-law-vi-graph","key_concepts":["Ohm","V I"]}]},"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-11-physics.10.electricity.ohms-law-vi-graph","subject_area":"physics"},"renderer":"html_three_js_local","storyboard":{"beats":[{"label":"Topic","visual":"Show the topic title and the key physical context.","narration":"Ohm's 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's 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: V-I Graph</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%,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(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>Ohm's Law V-I Graph</h1>\n    <p class=\"sub\">Current is LINEAR with voltage, not exponential</p>\n    <p class=\"formula\">I = V / R</p>\n    <label class=\"control\"><span>Voltage: <strong id=\"v-voltage\">3</strong> V</span><input id=\"c-voltage\" type=\"range\" min=\"0.5\" max=\"10\" step=\"0.5\" value=\"3\"/></label>\n    <label class=\"control\"><span>Resistance: <strong id=\"v-resistance\">2</strong> Ω</span><input id=\"c-resistance\" type=\"range\" min=\"1\" max=\"8\" step=\"0.5\" value=\"2\"/></label>\n    <label class=\"control\"><span>Show Exponential (Wrong): <strong id=\"v-exponential\">OFF</strong></span><input id=\"c-exponential\" type=\"range\" min=\"0\" max=\"1\" step=\"1\" value=\"0\"/></label>\n    <ul>\n      <li>✗ Wrong: I ∝ e^V (exponential)</li>\n      <li>✓ Right: I = V/R (linear)</li>\n      <li>Fixed R → straight line</li>\n      <li>Slope = 1/R</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 = [\n  {\"key\":\"voltage\",\"label\":\"Voltage\",\"min\":0.5,\"max\":10,\"step\":0.5,\"value\":3,\"units\":\"V\"},\n  {\"key\":\"resistance\",\"label\":\"Resistance\",\"min\":1,\"max\":8,\"step\":0.5,\"value\":2,\"units\":\"Ω\"},\n  {\"key\":\"exponential\",\"label\":\"Show Exponential\",\"min\":0,\"max\":1,\"step\":1,\"value\":0,\"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',()=>{\n    out.textContent=(c.key==='exponential')?(inp.value==='1'?'ON':'OFF'):inp.value;\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  \n  let lastTs=0;\n  let cyclePhase=0;\n  let trailPoints=[];\n  let indicatorPos={x:0,y: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){\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=10;\n    ctx.strokeStyle=color;ctx.lineWidth=2;\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    const W=cv.width,H=cv.height;\n    \n    // Read controls\n    const voltage=parseFloat(document.getElementById('c-voltage').value);\n    const resistance=parseFloat(document.getElementById('c-resistance').value);\n    const showExponential=parseInt(document.getElementById('c-exponential').value);\n    \n    // Phase for animation\n    cyclePhase+=(dt*0.7);\n    if(cyclePhase>1)cyclePhase-=1;\n    \n    // Current calculations\n    const correctI=voltage/resistance;\n    const wrongI=Math.exp(voltage/3)-1;\n    \n    // Graph dimensions\n    const graphLeft=W*0.15;\n    const graphRight=W*0.85;\n    const graphTop=H*0.15;\n    const graphBottom=H*0.8;\n    const graphW=graphRight-graphLeft;\n    const graphH=graphBottom-graphTop;\n    \n    ctx.clearRect(0,0,W,H);\n    \n    // ===== LAYER 1: Background + Grid =====\n    ctx.fillStyle='rgba(15,20,24,0.5)';\n    ctx.fillRect(graphLeft,graphTop,graphW,graphH);\n    ctx.strokeStyle='#303449';\n    ctx.lineWidth=1;\n    ctx.globalAlpha=0.3;\n    for(let i=0;i<=5;i++){\n      const x=graphLeft+(graphW/5)*i;\n      const y=graphTop+(graphH/5)*i;\n      ctx.beginPath();ctx.moveTo(x,graphTop);ctx.lineTo(x,graphBottom);ctx.stroke();\n      ctx.beginPath();ctx.moveTo(graphLeft,y);ctx.lineTo(graphRight,y);ctx.stroke();\n    }\n    ctx.globalAlpha=1;\n    \n    // ===== LAYER 2: Axes & Labels =====\n    ctx.strokeStyle='#627da5';ctx.lineWidth=2;\n    ctx.beginPath();ctx.moveTo(graphLeft,graphBottom);ctx.lineTo(graphRight,graphBottom);ctx.stroke();\n    ctx.beginPath();ctx.moveTo(graphLeft,graphTop);ctx.lineTo(graphLeft,graphBottom);ctx.stroke();\n    \n    // X-axis label (Voltage)\n    ctx.fillStyle='var(--text)';\n    ctx.font=Math.round(H*0.035)+'px sans-serif';\n    ctx.textAlign='center';\n    ctx.fillText('Voltage (V)',graphLeft+graphW/2,graphBottom+H*0.08);\n    \n    // Y-axis label (Current)\n    ctx.save();\n    ctx.translate(graphLeft-H*0.06,graphTop+graphH/2);\n    ctx.rotate(-Math.PI/2);\n    ctx.fillText('Current (A)',0,0);\n    ctx.restore();\n    \n    // Axis scale labels\n    ctx.font=Math.round(H*0.025)+'px sans-serif';\n    ctx.fillStyle='#9f9ea1';\n    for(let i=0;i<=5;i++){\n      const vLabel=(i/5*10).toFixed(0);\n      const x=graphLeft+(graphW/5)*i;\n      ctx.textAlign='center';\n      ctx.fillText(vLabel,x,graphBottom+H*0.04);\n      \n      const iLabel=(i/5*6).toFixed(1);\n      ctx.textAlign='right';\n      const y=graphBottom-(graphH/5)*i;\n      ctx.fillText(iLabel,graphLeft-H*0.02,y+H*0.01);\n    }\n    \n    // ===== LAYER 3: Curve Data =====\n    // Draw correct linear curve\n    ctx.strokeStyle='#8decb0';ctx.lineWidth=3;ctx.beginPath();\n    let first=true;\n    for(let v=0;v<=10;v+=0.1){\n      const i=v/resistance;\n      const px=graphLeft+(v/10)*graphW;\n      const py=graphBottom-(i/6)*graphH;\n      if(first){ctx.moveTo(px,py);first=false;}\n      else ctx.lineTo(px,py);\n    }\n    ctx.stroke();\n    \n    // Draw wrong exponential curve if enabled\n    if(showExponential){\n      ctx.strokeStyle='#df8279';ctx.lineWidth=3;ctx.lineWidth=2;ctx.setLineDash([6,4]);ctx.globalAlpha=0.7;\n      ctx.beginPath();first=true;\n      for(let v=0;v<=10;v+=0.1){\n        const i=Math.exp(v/3)-1;\n        if(i>6.5)break;\n        const px=graphLeft+(v/10)*graphW;\n        const py=graphBottom-(i/6)*graphH;\n        if(first){ctx.moveTo(px,py);first=false;}\n        else ctx.lineTo(px,py);\n      }\n      ctx.stroke();\n      ctx.setLineDash([]);\n      ctx.globalAlpha=1;\n    }\n    \n    // ===== LAYER 4: Active Point Indicator =====\n    // Animate the point along the curve\n    const animV=cyclePhase*10;\n    const animI=animV/resistance;\n    const px=graphLeft+(animV/10)*graphW;\n    const py=graphBottom-(animI/6)*graphH;\n    \n    // Trail effect\n    trailPoints.push({x:px,y:py});\n    if(trailPoints.length>60)trailPoints.shift();\n    \n    ctx.strokeStyle='rgba(142,220,176,0.2)';ctx.lineWidth=1;\n    ctx.beginPath();\n    for(let i=0;i<trailPoints.length;i++){\n      if(i===0)ctx.moveTo(trailPoints[i].x,trailPoints[i].y);\n      else ctx.lineTo(trailPoints[i].x,trailPoints[i].y);\n    }\n    ctx.stroke();\n    \n    // Glow around current point\n    glowDot(px,py,6,'rgba(142,220,176,ALPHA)',0.4);\n    ctx.fillStyle='#8decb0';ctx.beginPath();ctx.arc(px,py,4,0,Math.PI*2);ctx.fill();\n    \n    // ===== LAYER 5: Annotations & Icons =====\n    // Show current calculation at bottom\n    const currentCalc=animI.toFixed(2);\n    ctx.font='bold '+Math.round(H*0.04)+'px sans-serif';\n    ctx.fillStyle='#8decb0';\n    ctx.textAlign='left';\n    ctx.fillText('✓ Correct: I = V/R',W*0.15,H*0.92);\n    ctx.font=Math.round(H*0.032)+'px sans-serif';\n    ctx.fillStyle='#627da5';\n    ctx.fillText('I = '+animV.toFixed(1)+' / '+resistance+' = '+currentCalc+' A',W*0.15,H*0.97);\n    \n    if(showExponential){\n      const wrongCalc=wrongI.toFixed(2);\n      ctx.font='bold '+Math.round(H*0.04)+'px sans-serif';\n      ctx.fillStyle='#df8279';\n      ctx.fillText('✗ Wrong: I = e^(V/3) - 1',W*0.62,H*0.92);\n      ctx.font=Math.round(H*0.032)+'px sans-serif';\n      ctx.fillStyle='#9f9ea1';\n      ctx.fillText('I = e^('+animV.toFixed(1)+'/3) - 1 = '+wrongCalc+' A',W*0.62,H*0.97);\n    }\n    \n    // ===== LEGEND =====\n    let legendText='V: '+voltage.toFixed(1)+'","remediationGoal":"Close formula_misuse for physics."},"rendererStyle":"three_js"},"simulation_title":"Ohm's Law (V-I Graph)"}},"metadata":{"rendered_at":"2026-05-20T11:12:29.956Z","cache_hit":false,"cost_usd":0},"error":null}