{"job_id":"anim-job-f892deb7-160e-4e1e-83f5-19a5b2e940a8","request_id":"bulk-2026-05-21T09-46-48-791Z-2-a1-physics.08.force-pressure.balanced-vs-unbalanced","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-f892deb7-160e-4e1e-83f5-19a5b2e940a8/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-f892deb7-160e-4e1e-83f5-19a5b2e940a8/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-f892deb7-160e-4e1e-83f5-19a5b2e940a8/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-f892deb7-160e-4e1e-83f5-19a5b2e940a8/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-f892deb7-160e-4e1e-83f5-19a5b2e940a8/scene-source.json","duration_seconds":15,"byte_size":477312,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-f892deb7-160e-4e1e-83f5-19a5b2e940a8","interactivity":"none","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-f892deb7-160e-4e1e-83f5-19a5b2e940a8","request":{"gap":{"topic":"force_pressure-balanced_vs_unbalanced","severity":"moderate","error_type":"concept_misunderstanding","memory_state":"fragile","display_topic":"Balanced vs Unbalanced Forces","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":"8","language":"en"},"interactivity":"none","duration_seconds":15},"context":{"chapter":{"name":"Force & Pressure","ncert_class":8},"sub_topics":[{"topic":"force_pressure-balanced_vs_unbalanced","key_concepts":["Balanced vs Unbalanced Forces","Force & Pressure"]}]},"metadata":{"priority":"normal","trace_id":"bulk-run-2026-05-21T09-46-48-791Z"},"exam_type":"neet","asset_type":"simulation","request_id":"bulk-2026-05-21T09-46-48-791Z-2-a1-physics.08.force-pressure.balanced-vs-unbalanced","subject_area":"physics"},"renderer":"html_three_js_local","storyboard":{"beats":[{"label":"Topic","visual":"Show the topic title and the key physical context.","narration":"Balanced vs Unbalanced Forces"},{"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":"Balanced vs Unbalanced Forces. Force & Pressure"}],"title":"Balanced vs Unbalanced Forces","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>Balanced vs Unbalanced Forces</title>\n  <style>\n    :root{--bg:#eef2f5;--panel:#ffffff;--line:#cfd8e3;--accent:#3b82f6;--text:#2f3b4a;--muted:#6b7a90;--blue:#3b82f6;--green:#159947;--red:#e76f51;}\n    *{box-sizing:border-box;}\n    body{margin:0;font-family:\"Plus Jakarta Sans\",\"Manrope\",\"Inter\",ui-sans-serif,system-ui,sans-serif;background:var(--bg);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:var(--panel);padding:24px;overflow:auto;}\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:#f7f9fc;color:#243447;font-family:ui-monospace,monospace;font-size:0.9rem;}\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 var(--line);border-radius:14px;position:relative;overflow:hidden;background:#f6f8fb;box-shadow:0 6px 20px rgba(20,33,61,.08);}\n    .legend{position:absolute;right:12px;top:12px;padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:#ffffff;font-size:0.8rem;color:var(--muted);}\n    .key-box{padding:10px;border-radius:8px;margin:8px 0;font-size:0.85rem;line-height:1.4;border-left:3px solid var(--accent);}\n    .misconception{background:#ffe6e6;border-left-color:var(--red);color:#5d1e1e;}\n    .correction{background:#e8f5e9;border-left-color:var(--green);color:#1b5e20;}\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>Balanced vs Unbalanced Forces</h1>\n    <p class=\"sub\">Forces behave differently based on their sum</p>\n    <p class=\"formula\">ΣF = ma</p>\n    <label class=\"control\"><span>Net Force (N): <strong id=\"v-force\">8</strong></span><input id=\"c-force\" type=\"range\" min=\"0\" max=\"20\" step=\"1\" value=\"8\"/></label>\n    <label class=\"control\"><span>Show Applied Force: <strong id=\"v-show\">1</strong></span><input id=\"c-show\" type=\"range\" min=\"0\" max=\"1\" step=\"1\" value=\"1\"/></label>\n    <div class=\"key-box misconception\">\n      ❌ <strong>Misconception:</strong> Forces always produce the same motion result\n    </div>\n    <div class=\"key-box correction\">\n      ✓ <strong>Truth:</strong> Motion depends on whether ΣF = 0 (balanced) or ΣF ≠ 0 (unbalanced)\n    </div>\n    <ul>\n      <li><strong>Balanced:</strong> ΣF=0 → a=0 → no change in motion</li>\n      <li><strong>Unbalanced:</strong> ΣF≠0 → a≠0 → velocity changes</li>\n      <li><strong>The key:</strong> Same force *value* can produce different outcomes depending on other forces present</li>\n    </ul>\n  </aside>\n  <section>\n    <div class=\"stage\" id=\"stage\">\n      <div class=\"legend\" id=\"legend\">Scenario A: Balanced Forces</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\":\"force\",\"label\":\"Net Force\",\"min\":0,\"max\":20,\"step\":1,\"value\":8,\"units\":\"N\"},\n  {\"key\":\"show\",\"label\":\"Show Applied\",\"min\":0,\"max\":1,\"step\":1,\"value\":1,\"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  \n  // State variables\n  let scenarioA_x=0, scenarioA_v=0;\n  let scenarioB_x=0, scenarioB_v=0;\n  let time=0;\n  \n  // Trail history\n  let trailA=[], trailB=[];\n  const maxTrail=60;\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=12;\n    ctx.strokeStyle=color;ctx.lineWidth=width;\n    ctx.beginPath();ctx.moveTo(x1,y1);ctx.lineTo(x2,y2);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 glowDot(x,y,r,color,a){\n    const g=ctx.createRadialGradient(x,y,0,x,y,r*2.6);\n    g.addColorStop(0,color+''+Math.round(a*255).toString(16).padStart(2,'0'));\n    g.addColorStop(1,color+'00');\n    ctx.fillStyle=g;\n    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;ctx.globalAlpha=0.35;\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 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 netForce=Number(document.getElementById('c-force').value);\n    const showApplied=Number(document.getElementById('c-show').value)>0.5;\n    \n    // Physics update\n    time+=dt;\n    \n    // Scenario A: Balanced (always has friction = applied force)\n    let frictionA=8; // constant friction\n    let appliedA=8;  // applied force = 8N always\n    let netForceA=appliedA-frictionA; // = 0 (balanced)\n    let accA=netForceA/5; // m=5kg\n    scenarioA_v+=accA*dt;\n    scenarioA_v*=0.99; // damping\n    scenarioA_x+=scenarioA_v*dt*80;\n    \n    // Scenario B: Unbalanced (applied force varies)\n    let frictionB=4; // constant friction\n    let appliedB=netForce; // varies with slider\n    let netForceB=appliedB-frictionB;\n    let accB=netForceB/5; // m=5kg\n    scenarioB_v+=accB*dt;\n    scenarioB_x+=scenarioB_v*dt*80;\n    \n    // Trail recording\n    if(time%0.08<dt){\n      trailA.push({x:scenarioA_x,y:0});\n      trailB.push({x:scenarioB_x,y:0});\n      while(trailA.length>maxTrail)trailA.shift();\n      while(trailB.length>maxTrail)trailB.shift();\n    }\n    \n    // Clamp positions to visible range\n    const pad=80;\n    scenarioA_x=Math.max(-pad*0.5,Math.min(pad*3.5,scenarioA_x));\n    scenarioB_x=Math.max(-pad*0.5,Math.min(pad*3.5,scenarioB_x));\n    \n    // Drawing\n    ctx.clearRect(0,0,W,H);\n    ctx.fillStyle='#f6f8fb';\n    ctx.fillRect(0,0,W,H);\n    \n    // Background grid\n    ctx.strokeStyle='#e8ecf1';\n    ctx.lineWidth=0.5;\n    for(let i=0;i<W;i+=60){\n      ctx.beginPath();ctx.moveTo(i,0);ctx.lineTo(i,H);ctx.stroke();\n    }\n    \n    const sc1Y=H*0.35;\n    const sc2Y=H*0.75;\n    \n    // ===== SCENARIO A: BALANCED =====\n    ctx.fillStyle='#243447';\n    ctx.font=Math.round(H*0.035)+'px sans-serif';\n    ctx.textAlign='left';\n    ctx.fillText('Scenario A: Balanced Forces',20,sc1Y-40);\n    \n    // Ground\n    ctx.strokeStyle='#6b7a90';ctx.lineWidth=2;\n    ctx.beginPath();ctx.moveTo(20,sc1Y+50);ctx.lineTo(W-20,sc1Y+50);ctx.stroke();\n    \n    // Box A\n    const boxX_A=40+scenarioA_x;\n    ctx.fillStyle='#3b82f6';\n    ctx.fillRect(boxX_A,sc1Y-30,40,30);\n    glowDot(boxX_A+20,sc1Y-15,8,'#3b82f61a',0.6);\n    \n    // Applied force arrow (right)\n    if(showApplied){\n      arrow(boxX_A+40,sc1Y-15,boxX_A+40+40,sc1Y-15,'#159947',3);\n      ctx.fillStyle='#159947';\n      ctx.font=Math.round(H*0.028)+'px sans-serif';\n      ctx.fillText('8N',boxX_A+50,sc1Y-22);\n    }\n    \n    // Friction arrow (left)\n    arrow(boxX_A,sc1Y-15,boxX_A-40,sc1Y-15,'#e76f51',2);\n    ctx.fillStyle='#e76f51';\n    ctx.font=Math.round(H*0.028)+'px sans-serif';\n    ctx.fillText('friction 8N',boxX_A-80,sc1Y-22);\n    \n    // Net force indicator\n    ctx.fillStyle='#6b7a90';\n    ctx.font=Math.round(H*0.032)+'px sans-serif';\n    ctx.textAlign='center';\n    ctx.fillText('ΣF = 0 N',boxX_A+20,sc1Y+70);\n    ctx.font=Math.round(H*0.026)+'px sans-serif';\n    ctx.fillStyle='#243447';\n    ctx.fillText('a = 0  →  stays at rest or moves at constant velocity',W/2,sc1Y+95);\n    \n    // Trail A\n    const scaledTrailA=trailA.map(p=>({x:40+p.x,y:sc1Y-30}));\n    trail(scaledTrailA,'#3b82f680');\n    \n    // ===== SCENARIO B: UNBALANCED =====\n    ctx.fillStyle='#243447';\n    ctx.font=Math.round(H*0.035)+'px sans-serif';\n    ctx.textAlign='left';\n    ctx.fillText('Scenario B: Unbalanced Forces',20,sc2Y-40);\n    \n    // Ground\n    ctx.strokeStyle='#6b7a90';ctx.lineWidth=2;\n    ctx.beginPath();ctx.moveTo(20,sc2Y+50);ctx.lineTo(W-20,sc2Y+50);ctx.stroke();\n    \n    // Box B\n    const boxX_B=40+scenarioB_x;\n    ctx.fillStyle='#e76f51';\n    ctx.fillRect(boxX_B,sc2Y-30,40,30);\n    glowDot(boxX_B+20,sc2Y-15,8,'#e76f511a',0.6);\n    \n    // Applied force arrow (right) — varies with slider\n    if(showApplied){\n      const arrowLen=netForce*3;\n      arrow(boxX_B+40,sc2Y-15,boxX_B+40+arrowLen,sc2Y-15,'#159947',3);\n      ctx.fillStyle='#159947';\n      ctx.font=Math.round(H*0.028)+'px sans-serif';\n      ctx.fillText(netForce+'N',boxX_B+arrowLen/2,sc2Y-22);\n    }\n    \n    // Friction arrow (left, constant)\n    arrow(boxX_B,sc2Y-15,boxX_B-28,sc2Y-15,'#e76f51',2);\n    ctx.fillStyle='#e76f51';\n    ctx.font=Math.round(H*0.028)+'px sans-serif';\n    ctx.fillText('friction 4N',boxX_B-75,sc2Y-22);\n    \n    // Net force indicator\n    ctx.fillStyle='#6b7a90';\n    ctx.font=Math.round(H*0.032)+'px sans-serif';\n    ctx.textAlign='center';\n    ctx.fillText('ΣF = '+(netForce-4)+' N',boxX_B+20","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"}}},"metadata":{"rendered_at":"2026-05-21T09:56:21.009Z","cache_hit":false,"cost_usd":0},"error":null}