{"job_id":"anim-job-343167a1-9955-493a-bac1-bbd107798e53","request_id":"bulk-2026-05-20T10-21-44-856Z-5-physics.09.laws-of-motion.action-reaction-pairs","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-343167a1-9955-493a-bac1-bbd107798e53/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-343167a1-9955-493a-bac1-bbd107798e53/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-343167a1-9955-493a-bac1-bbd107798e53/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-343167a1-9955-493a-bac1-bbd107798e53/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-343167a1-9955-493a-bac1-bbd107798e53/scene-source.json","duration_seconds":15,"byte_size":469815,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-343167a1-9955-493a-bac1-bbd107798e53","interactivity":"none","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-343167a1-9955-493a-bac1-bbd107798e53","request":{"gap":{"topic":"laws_of_motion-action_reaction_pairs","severity":"moderate","error_type":"concept_misunderstanding","memory_state":"fragile","display_topic":"Action-Reaction Pairs","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":"9","language":"en"},"interactivity":"none","duration_seconds":15},"context":{"chapter":{"name":"Laws of Motion","ncert_class":9},"sub_topics":[{"topic":"laws_of_motion-action_reaction_pairs","key_concepts":["Action-Reaction Pairs","Laws of Motion"]}]},"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-5-physics.09.laws-of-motion.action-reaction-pairs","subject_area":"physics"},"renderer":"html_three_js_local","storyboard":{"beats":[{"label":"Topic","visual":"Show the topic title and the key physical context.","narration":"Action-Reaction Pairs"},{"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":"Action-Reaction Pairs. Laws of Motion"}],"title":"Action-Reaction Pairs","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>Action-Reaction Pairs: Context Matters</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>Action-Reaction Pairs</h1>\n    <p class=\"sub\">Context changes the observable effects</p>\n    <p class=\"formula\">F₁₂ = −F₂₁ (always true)</p>\n    <label class=\"control\"><span>Mass Ratio (m₂/m₁): <strong id=\"v-mass\">1</strong></span><input id=\"c-mass\" type=\"range\" min=\"0.2\" max=\"5\" step=\"0.1\" value=\"1\"/></label>\n    <label class=\"control\"><span>Constraint Type: <strong id=\"v-constraint\">Free</strong></span><input id=\"c-constraint\" type=\"range\" min=\"0\" max=\"2\" step=\"1\" value=\"0\"/></label>\n    <label class=\"control\"><span>Applied Force: <strong id=\"v-force\">40</strong> N</span><input id=\"c-force\" type=\"range\" min=\"10\" max=\"80\" step=\"5\" value=\"40\"/></label>\n    <ul>\n      <li>✗ Mistake: Forces always produce equal motion</li>\n      <li>✓ Reality: Constraints + mass determine outcomes</li>\n      <li>Key: Same force pair, different accelerations</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\":\"mass\",\"label\":\"Mass Ratio\",\"min\":0.2,\"max\":5,\"step\":0.1,\"value\":1,\"units\":\"\"},{\"key\":\"constraint\",\"label\":\"Constraint\",\"min\":0,\"max\":2,\"step\":1,\"value\":0,\"units\":\"\"},{\"key\":\"force\",\"label\":\"Force\",\"min\":10,\"max\":80,\"step\":5,\"value\":40,\"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    if(c.key==='mass')out.textContent=(Math.round(inp.value*10)/10).toFixed(1);\n    else if(c.key==='constraint'){\n      const cmap=['Free','Pinned','Pulley'];\n      out.textContent=cmap[parseInt(inp.value)];\n    }\n    else out.textContent=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  \n  // STATE: positions, velocities, time\n  let x1=0,v1=0,x2=0,v2=0,t=0;\n  let trail1=[],trail2=[];\n  const m1=1;\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=1.5;ctx.globalAlpha=0.4;\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<3)return;\n    const nx=dx/l,ny=dy/l,s=8;\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();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);ctx.fill();\n  }\n  \n  function tick(ts){\n    const dt=Math.min(0.033,(ts-lastTs)/1000);lastTs=ts;\n    const W=cv.width,H=cv.height;\n    \n    // Read slider values\n    const m2=m1*Number(document.getElementById('c-mass').value);\n    const constraintType=parseInt(document.getElementById('c-constraint').value);\n    const appliedForce=Number(document.getElementById('c-force').value);\n    \n    t+=dt;\n    \n    // Physics: Action-Reaction\n    const F12=appliedForce;  // Force object1 applies to object2\n    const F21=-F12;         // Force object2 applies to object1 (reaction)\n    \n    // Accelerations depend on constraint\n    let a1=0,a2=0;\n    \n    if(constraintType===0){\n      // FREE: both can move\n      a1=F21/m1;  // object1 accelerates from reaction force\n      a2=F12/m2;  // object2 accelerates from action force\n    }else if(constraintType===1){\n      // PINNED: object1 fixed to wall\n      a1=0;       // constrained, no acceleration\n      a2=F12/m2;  // object2 still accelerates (wall provides reaction)\n    }else if(constraintType===2){\n      // PULLEY: coupled motion (constraint: v1=-v2)\n      const totalMass=m1+m2;\n      a1=-F12/totalMass;  // constrained motion\n      a2=F12/totalMass;\n    }\n    \n    // Integrate kinematics\n    v1+=a1*dt;\n    v2+=a2*dt;\n    x1+=v1*dt;\n    x2+=v2*dt;\n    \n    // Trail tracking\n    const cX1=150+x1*2;\n    const cX2=600+x2*2;\n    const cY=H*0.6;\n    \n    trail1.push({x:cX1,y:cY});\n    trail2.push({x:cX2,y:cY});\n    if(trail1.length>60)trail1.shift();\n    if(trail2.length>60)trail2.shift();\n    \n    // DRAW\n    ctx.fillStyle='#0E121A';\n    ctx.fillRect(0,0,W,H);\n    \n    // Ground line\n    ctx.strokeStyle='#303449';ctx.lineWidth=2;\n    ctx.beginPath();ctx.moveTo(0,cY+30);ctx.lineTo(W,cY+30);ctx.stroke();\n    \n    // Trails\n    trail(trail1,'#FC884F');\n    trail(trail2,'#627DA5');\n    \n    // Constraint visualization\n    if(constraintType===1){\n      // Wall\n      ctx.fillStyle='#445862';\n      for(let i=0;i<80;i+=8){\n        ctx.fillRect(80,cY-40+i,12,4);\n      }\n    }\n    \n    // Object 1\n    const r1=12+Math.abs(v1)*1.2;\n    ctx.fillStyle='#FC884F';\n    ctx.beginPath();ctx.arc(cX1,cY,r1,0,Math.PI*2);ctx.fill();\n    glowDot(cX1,cY,r1,'rgba(252,136,79,ALPHA)',0.3);\n    \n    // Object 2\n    const r2=10+Math.abs(v2)*1.2;\n    ctx.fillStyle='#627DA5';\n    ctx.beginPath();ctx.arc(cX2,cY,r2,0,Math.PI*2);ctx.fill();\n    glowDot(cX2,cY,r2,'rgba(98,125,165,ALPHA)',0.3);\n    \n    // Force arrows: Action-Reaction pair visualization\n    const arrowLen=Math.abs(F12)*0.5;\n    \n    if(constraintType!==1){\n      // Show F12 on object 2\n      arrow(cX2-arrowLen,cY,cX2-arrowLen+arrowLen*0.8,cY,'#8decb0');\n    }\n    if(constraintType===0){\n      // Show F21 on object 1 (reaction)\n      arrow(cX1+arrowLen,cY,cX1+arrowLen-arrowLen*0.8,cY,'#df8279');\n    }else if(constraintType===1){\n      // Wall reaction force on object2\n      arrow(cX2-arrowLen,cY,cX2-arrowLen+arrowLen*0.8,cY,'#8decb0');\n    }\n    \n    // Labels and data display\n    ctx.fillStyle='#FAF9F8';\n    ctx.font=Math.round(H*0.035)+'px sans-serif';\n    \n    ctx.textAlign='center';\n    ctx.fillText('Object 1',cX1,cY+50);\n    ctx.fillStyle='#FC884F';\n    ctx.font=Math.round(H*0.032)+'px monospace';\n    ctx.fillText('m='+(m1).toFixed(1)+' kg',cX1,cY+68);\n    ctx.fillText('v='+(v1*10).toFixed(1)+' m/s',cX1,cY+84);\n    ctx.fillText('a='+(a1*10).toFixed(1)+' m/s²',cX1,cY+100);\n    \n    ctx.fillStyle='#FAF9F8';\n    ctx.font=Math.round(H*0.035)+'px sans-serif';\n    ctx.textAlign='center';\n    ctx.fillText('Object 2',cX2,cY+50);\n    ctx.fillStyle='#627DA5';\n    ctx.font=Math.round(H*0.032)+'px monospace';\n    ctx.fillText('m='+(m2).toFixed(1)+' kg',cX2,cY+68);\n    ctx.fillText('v='+(v2*10).toFixed(1)+' m/s',cX2,cY+84);\n    ctx.fillText('a='+(a2*10).toFixed(1)+' m/s²',cX2,cY+100);\n    \n    // Force pair annotation\n    ctx.fillStyle='#8decb0';\n    ctx.font=Math.round(H*0.03)+'px sans-serif';\n    ctx.textAlign='left';\n    ctx.fillText('F₁₂ = +'+appliedForce.toFixed(0)+' N',W*0.05,H*0.15);\n    ctx.fillStyle='#df8279';\n    ctx.fillText('F₂₁ = -'+appliedForce.toFixed(0)+' N',W*0.05,H*0.20);\n    \n    // Status message\n    ctx.fillStyle='#9F9EA1';\n    ctx.font=Math.round(H*0.027)+'px sans-serif';\n    let statusMsg='';\n    if(constraintType===0)statusMsg='Free: both objects accelerate';\n    else if(constraintType===1)statusMsg='Pinned: only object 2 moves';\n    else if(constraintType===2)statusMsg='Coupled: opposite accelerations';\n    ctx.","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"}}},"metadata":{"rendered_at":"2026-05-20T10:43:23.042Z","cache_hit":false,"cost_usd":0},"error":null}