{"job_id":"anim-job-e3c93ea3-c819-4933-b7c2-24020c95295e","request_id":"test-physics-ohm-fef4a9a4-ee3c-4109-9b59-ca80c158fc36-1778702709883","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-e3c93ea3-c819-4933-b7c2-24020c95295e/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-e3c93ea3-c819-4933-b7c2-24020c95295e/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-e3c93ea3-c819-4933-b7c2-24020c95295e/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-e3c93ea3-c819-4933-b7c2-24020c95295e/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-e3c93ea3-c819-4933-b7c2-24020c95295e/scene-source.json","duration_seconds":15,"byte_size":247534,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-e3c93ea3-c819-4933-b7c2-24020c95295e","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-e3c93ea3-c819-4933-b7c2-24020c95295e","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-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":"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 V-I Relationship</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>Ohm's Law</h1>\n    <p class=\"sub\">Understanding the linear V-I relationship. Correct the misconception!</p>\n    <p class=\"formula\">V = I × R  →  I = V / R</p>\n    <label class=\"control\"><span>Voltage: <strong id=\"v-voltage\">5</strong> V</span><input id=\"c-voltage\" type=\"range\" min=\"1\" max=\"10\" step=\"0.5\" value=\"5\"/></label>\n    <label class=\"control\"><span>Resistance: <strong id=\"v-resistance\">2</strong> Ω</span><input id=\"c-resistance\" type=\"range\" min=\"1\" max=\"10\" step=\"0.5\" value=\"2\"/></label>\n    <label class=\"control\"><span>Animation Speed: <strong id=\"v-speed\">1</strong>x</span><input id=\"c-speed\" type=\"range\" min=\"0.5\" max=\"2\" step=\"0.1\" value=\"1\"/></label>\n    <ul>\n      <li><strong>Mistake:</strong> I ∝ e^V (exponential)</li>\n      <li><strong>Truth:</strong> I = V/R (linear)</li>\n      <li><strong>Why:</strong> Resistance is constant; doubling V doubles I</li>\n      <li><strong>Graph:</strong> Watch the linear trace form</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\":1,\"max\":10,\"step\":0.5,\"value\":5,\"units\":\"V\"},\n  {\"key\":\"resistance\",\"label\":\"Resistance\",\"min\":1,\"max\":10,\"step\":0.5,\"value\":2,\"units\":\"Ω\"},\n  {\"key\":\"speed\",\"label\":\"Animation Speed\",\"min\":0.5,\"max\":2,\"step\":0.1,\"value\":1,\"units\":\"x\"}\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  let lastTs=0;\n  \n  // State: linear and exponential current traces, phase counter\n  let linearTrail=[];\n  let exponentialTrail=[];\n  let phaseTime=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 trail(points,color){\n    if(points.length<2)return;\n    ctx.strokeStyle=color;ctx.lineWidth=2.5;ctx.globalAlpha=0.7;\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=10;\n    ctx.strokeStyle=color;ctx.lineWidth=2;ctx.beginPath();\n    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 sliders\n    const voltage=Number(document.getElementById('c-voltage').value);\n    const resistance=Number(document.getElementById('c-resistance').value);\n    const speed=Number(document.getElementById('c-speed').value);\n    \n    // Update phase time\n    phaseTime+=(dt*speed*0.8);\n    if(phaseTime>1.0)phaseTime=0;\n    \n    // Calculate currents at this voltage point\n    const linearCurrent=voltage/resistance;\n    const exponentialCurrent=0.1*Math.exp(voltage*0.4);\n    \n    // Clamp for display\n    const maxExp=Math.exp(10*0.4)*0.1;\n    \n    // Axis positions\n    const graphLeft=W*0.12;\n    const graphRight=W*0.95;\n    const graphBottom=H*0.85;\n    const graphTop=H*0.15;\n    \n    // Voltage range: 1-10V, Current range: 0-5A\n    const voltageRange=9;\n    const currentRangeLinear=5;\n    const currentRangeExp=maxExp;\n    \n    // Clear\n    ctx.clearRect(0,0,W,H);\n    \n    // Draw grid background\n    ctx.fillStyle='rgba(99,179,255,0.04)';\n    ctx.fillRect(graphLeft,graphTop,graphRight-graphLeft,graphBottom-graphTop);\n    \n    // Draw axes\n    ctx.strokeStyle='rgba(200,212,218,0.3)';\n    ctx.lineWidth=1.5;\n    ctx.beginPath();\n    ctx.moveTo(graphLeft,graphBottom);\n    ctx.lineTo(graphRight,graphBottom);\n    ctx.stroke();\n    ctx.beginPath();\n    ctx.moveTo(graphLeft,graphTop);\n    ctx.lineTo(graphLeft,graphBottom);\n    ctx.stroke();\n    \n    // Axis labels\n    ctx.fillStyle='var(--muted)';\n    ctx.font=Math.round(H*0.032)+'px sans-serif';\n    ctx.textAlign='center';\n    ctx.fillText('Voltage (V)',graphLeft+(graphRight-graphLeft)*0.5,graphBottom+H*0.06);\n    ctx.save();\n    ctx.translate(graphLeft-H*0.08,graphTop+(graphBottom-graphTop)*0.5);\n    ctx.rotate(-Math.PI/2);\n    ctx.fillText('Current (A)',0,0);\n    ctx.restore();\n    \n    // Grid lines and ticks for voltage (horizontal)\n    ctx.strokeStyle='rgba(200,212,218,0.15)';\n    ctx.lineWidth=0.8;\n    for(let v=1;v<=10;v++){\n      const x=graphLeft+((v-1)/voltageRange)*(graphRight-graphLeft);\n      ctx.beginPath();ctx.moveTo(x,graphBottom);ctx.lineTo(x,graphBottom+5);ctx.stroke();\n      ctx.fillStyle='rgba(200,212,218,0.4)';\n      ctx.font=Math.round(H*0.026)+'px sans-serif';\n      ctx.textAlign='center';\n      ctx.fillText(String(v),x,graphBottom+H*0.04);\n      ctx.strokeStyle='rgba(200,212,218,0.08)';\n      ctx.beginPath();ctx.moveTo(x,graphTop);ctx.lineTo(x,graphBottom);ctx.stroke();\n    }\n    \n    // Grid lines and ticks for current (vertical) - linear scale\n    ctx.strokeStyle='rgba(200,212,218,0.15)';\n    ctx.lineWidth=0.8;\n    for(let i=0;i<=5;i++){\n      const y=graphBottom-((i/currentRangeLinear)*(graphBottom-graphTop));\n      ctx.beginPath();ctx.moveTo(graphLeft-5,y);ctx.lineTo(graphLeft,y);ctx.stroke();\n      ctx.fillStyle='rgba(200,212,218,0.4)';\n      ctx.font=Math.round(H*0.026)+'px sans-serif';\n      ctx.textAlign='right';\n      ctx.fillText(String(i.toFixed(1)),graphLeft-10,y+H*0.012);\n      ctx.strokeStyle='rgba(200,212,218,0.08)';\n      ctx.beginPath();ctx.moveTo(graphLeft,y);ctx.lineTo(graphRight,y);ctx.stroke();\n    }\n    \n    // Update trails by sampling voltages from 1 to current voltage\n    linearTrail=[];\n    exponentialTrail=[];\n    \n    const sampledVoltage=1+phaseTime*voltageRange;\n    \n    for(let v=1;v<=sampledVoltage;v+=0.1){\n      const x=graphLeft+((v-1)/voltageRange)*(graphRight-graphLeft);\n      \n      // Linear: I=V/R\n      const iLin=v/resistance;\n      const yLin=graphBottom-((iLin/currentRangeLinear)*(graphBottom-graphTop));\n      linearTrail.push({x,y:yLin});\n      \n      // Exponential (misconception): I = 0.1*e^(0.4*V)\n      const iExp=0.1*Math.exp(v*0.4);\n      const yExp=graphBottom-Math.min((iExp/currentRangeExp)*(graphBottom-graphTop),graphBottom-graphTop);\n      exponentialTrail.push({x,y:yExp});\n    }\n    \n    // Draw trails\n    trail(exponentialTrail,'rgba(222,127,118,0.4)');\n    trail(linearTrail,'rgba(135,232,168,1)');\n    \n    // Draw current evaluation points\n    const sampledX=graphLeft+((sampledVoltage-1)/voltageRange)*(graphRight-graphLeft);\n    const currLinear=sampledVoltage/resistance;\n    const currExp=0.1*Math.exp(sampledVoltage*0.4);\n    \n    const yL=graphBottom-((currLinear/currentRangeLinear)*(graphBottom-graphTop));\n    const yE=graphBottom-Math.min((currExp/currentRangeExp)*(graphBottom-graphTop),graphBottom-graphTop);\n    \n    // Glow at current point\n    glowDot(sampledX,yL,8,'rgba(135,232,168,ALPHA)',0.6);\n    ctx.fillStyle='var(--green)';\n    ctx.beginPath();ctx.arc(sampledX,yL,5,0,Math.PI*2);ctx.fill();\n    \n    glowDot(sampledX,yE,8,'rgba(222,127,118,ALPHA)',0.4);\n    ctx.fillStyle='var(--red)';\n    ctx.beginPath();ctx.arc(sampledX,yE,5,0,Math.PI*2);ctx.fill();\n    \n    // Draw voltage guide line\n    ctx.strokeStyle='rgba(99,179,255,0.3)';\n    ctx.lineWidth=1.5;\n    ctx.setLineDash([4,4]);\n    ctx.beginPath();\n    ctx.moveTo(sampledX,graphTop);\n    ctx.lineTo(sampledX,graphBottom);\n    ctx.stroke();\n    ctx.setLineDash([]);\n    \n    // Title box\n    ctx.fillStyle","remediationGoal":"Close formula_misuse for physics."},"rendererStyle":"three_js"},"simulation_title":"Ohm's Law (V-I Graph)"}},"metadata":{"rendered_at":"2026-05-13T20:10:12.996Z","cache_hit":false,"cost_usd":0},"error":null}