{"job_id":"anim-job-aed69238-4317-41dc-8ed0-b9abd45d1a3e","request_id":"bulk-2026-05-21T05-50-51-670Z-1-a2-physics.08.motion.distance-vs-displacement","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aed69238-4317-41dc-8ed0-b9abd45d1a3e/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aed69238-4317-41dc-8ed0-b9abd45d1a3e/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aed69238-4317-41dc-8ed0-b9abd45d1a3e/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aed69238-4317-41dc-8ed0-b9abd45d1a3e/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aed69238-4317-41dc-8ed0-b9abd45d1a3e/scene-source.json","duration_seconds":15,"byte_size":471540,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-aed69238-4317-41dc-8ed0-b9abd45d1a3e","control_count":2,"interactivity":"none","simulation_id":"physics.08.motion.distance_vs_displacement","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-aed69238-4317-41dc-8ed0-b9abd45d1a3e","request":{"gap":{"topic":"motion-distance_vs_displacement","severity":"moderate","error_type":"concept_misunderstanding","memory_state":"fragile","display_topic":"Distance vs Displacement","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":"Motion","ncert_class":8},"sub_topics":[{"topic":"motion-distance_vs_displacement","key_concepts":["Distance vs Displacement","Motion"]}]},"metadata":{"priority":"normal","trace_id":"bulk-run-2026-05-21T05-50-51-670Z"},"exam_type":"neet","asset_type":"simulation","request_id":"bulk-2026-05-21T05-50-51-670Z-1-a2-physics.08.motion.distance-vs-displacement","subject_area":"physics"},"renderer":"html_three_js_local","storyboard":{"beats":[{"label":"Topic","visual":"Show the topic title and the key physical context.","narration":"Distance vs Displacement"},{"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":"Distance vs Displacement. Motion"}],"title":"Distance vs Displacement","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>Distance vs Displacement: Context Matters</title>\n  <style>\n    :root{--bg:#101417;--panel:#1c232e;--line:#3b4a55;--accent:#e0b15b;--text:#f3f7fa;--muted:#a8b4bf;--blue:#4ea8ff;--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%,#2a3944 0%,var(--bg) 58%);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:#162029;color:var(--accent);font-family:ui-monospace,monospace;font-size:0.9rem;box-shadow:inset 0 0 28px rgba(224,177,91,.14);}\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 #4b6170;border-radius:14px;position:relative;overflow:hidden;background:radial-gradient(circle at 50% 38%,#3f6272,#141b22 72%);box-shadow:0 18px 60px rgba(0,0,0,.42), inset 0 0 90px rgba(255,255,255,.05);}\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>Distance vs Displacement</h1>\n    <p class=\"sub\">Why context matters—straight line ≠ circular path</p>\n    <p class=\"formula\">Distance ≥ |Displacement|</p>\n    <label class=\"control\"><span>Path Type: <strong id=\"v-pathType\">Straight</strong></span><input id=\"c-pathType\" type=\"range\" min=\"0\" max=\"2\" step=\"1\" value=\"0\"/></label>\n    <label class=\"control\"><span>Speed: <strong id=\"v-speed\">1.0</strong> m/s</span><input id=\"c-speed\" type=\"range\" min=\"0.3\" max=\"2\" step=\"0.1\" value=\"1.0\"/></label>\n    <label class=\"control\"><span>Show Vector: <strong id=\"v-showVector\">On</strong></span><input id=\"c-showVector\" type=\"range\" min=\"0\" max=\"1\" step=\"1\" value=\"1\"/></label>\n    <ul>\n      <li><strong>❌ Misconception:</strong> Distance and displacement are always the same thing.</li>\n      <li><strong>✓ Truth:</strong> Displacement depends on <em>start</em> and <em>end</em> points only. Distance follows the <em>actual path</em>.</li>\n      <li><strong>Why?</strong> Straight line = shortest path. Circular/curved = longer path, same displacement.</li>\n      <li><strong>Key:</strong> Use straight-line distance only when motion is 1D or the path is irrelevant.</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\":\"pathType\",\"label\":\"Path Type\",\"min\":0,\"max\":2,\"step\":1,\"value\":0,\"units\":\"\"},\n  {\"key\":\"speed\",\"label\":\"Speed\",\"min\":0.3,\"max\":2,\"step\":0.1,\"value\":1.0,\"units\":\"m/s\"},\n  {\"key\":\"showVector\",\"label\":\"Show Vector\",\"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',()=>{\n    if(c.key==='pathType'){\n      const labels=['Straight','Circular','Curved'];\n      out.textContent=labels[parseInt(inp.value)];\n    }else if(c.key==='showVector'){\n      out.textContent=inp.value==='1'?'On':'Off';\n    }else{\n      out.textContent=inp.value;\n    }\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 phase=0;\n  let totalDistance=0;\n  let pathTrail=[];\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,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;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 pathType=parseInt(document.getElementById('c-pathType').value);\n    const speed=parseFloat(document.getElementById('c-speed').value);\n    const showVector=parseInt(document.getElementById('c-showVector').value);\n    \n    // Update phase (animation time)\n    phase+=(speed*dt)/4;\n    if(phase>1)phase=0;\n    \n    // Compute position based on path type\n    let x,y,lastX,lastY;\n    const startX=W*0.25, startY=H*0.5;\n    const endX=W*0.75, endY=H*0.5;\n    \n    if(pathType===0){\n      // Straight line\n      x=startX+(endX-startX)*phase;\n      y=startY+(endY-startY)*phase;\n      lastX=startX+(endX-startX)*Math.max(0,phase-dt*speed/4);\n      lastY=startY+(endY-startY)*Math.max(0,phase-dt*speed/4);\n    }else if(pathType===1){\n      // Circular path (180° arc above)\n      const radius=(endX-startX)/2;\n      const cx=(startX+endX)/2;\n      const angle=Math.PI*phase;\n      x=cx+radius*Math.cos(Math.PI+angle);\n      y=startY-radius*Math.sin(angle);\n      const lastAngle=Math.PI*Math.max(0,phase-dt*speed/4);\n      lastX=cx+radius*Math.cos(Math.PI+lastAngle);\n      lastY=startY-radius*Math.sin(lastAngle);\n    }else{\n      // Wavy path\n      x=startX+(endX-startX)*phase;\n      y=startY+Math.sin(phase*Math.PI*3)*30;\n      lastX=startX+(endX-startX)*Math.max(0,phase-dt*speed/4);\n      lastY=startY+Math.sin(Math.max(0,phase-dt*speed/4)*Math.PI*3)*30;\n    }\n    \n    // Update trail and distance\n    if(pathTrail.length===0||Math.hypot(x-pathTrail[pathTrail.length-1].x,y-pathTrail[pathTrail.length-1].y)>1.5){\n      pathTrail.push({x,y});\n      if(pathTrail.length>200)pathTrail.shift();\n      if(lastX!==undefined){\n        totalDistance+=Math.hypot(x-lastX,y-lastY);\n      }\n    }\n    \n    if(phase<0.01){\n      totalDistance=0;\n      pathTrail=[];\n    }\n    \n    // Compute displacement magnitude\n    const dispX=x-startX, dispY=y-startY;\n    const displacement=Math.hypot(dispX,dispY);\n    \n    // Clear canvas\n    ctx.clearRect(0,0,W,H);\n    \n    // Background grid\n    ctx.strokeStyle='rgba(59,74,85,0.3)';\n    ctx.lineWidth=1;\n    for(let i=0;i<=10;i++){\n      const px=W*i/10;\n      ctx.beginPath();ctx.moveTo(px,0);ctx.lineTo(px,H);ctx.stroke();\n    }\n    \n    // Draw start and end points\n    ctx.fillStyle='#8decb0';\n    ctx.beginPath();ctx.arc(startX,startY,8,0,Math.PI*2);ctx.fill();\n    ctx.fillStyle='#f3f7fa';\n    ctx.font=Math.round(H*0.04)+'px sans-serif';\n    ctx.textAlign='center';ctx.fillText('Start',startX,startY-20);\n    \n    ctx.fillStyle='#df8279';\n    ctx.beginPath();ctx.arc(endX,endY,8,0,Math.PI*2);ctx.fill();\n    ctx.textAlign='center';ctx.fillText('End',endX,endY-20);\n    \n    // Draw path guide (faint)\n    if(pathType===0){\n      ctx.strokeStyle='rgba(78,168,255,0.2)';ctx.lineWidth=2;\n      ctx.beginPath();ctx.moveTo(startX,startY);ctx.lineTo(endX,endY);ctx.stroke();\n    }else if(pathType===1){\n      const radius=(endX-startX)/2;\n      const cx=(startX+endX)/2;\n      ctx.strokeStyle='rgba(78,168,255,0.2)';ctx.lineWidth=2;\n      ctx.beginPath();ctx.arc(cx,startY,radius,0,Math.PI);ctx.stroke();\n    }else{\n      ctx.strokeStyle='rgba(78,168,255,0.2)';ctx.lineWidth=2;\n      ctx.beginPath();\n      for(let t=0;t<=1;t+=0.02){\n        const px=startX+(endX-startX)*t;\n        const py=startY+Math.sin(t*Math.PI*3)*30;\n        if(t===0)ctx.moveTo(px,py);\n        else ctx.lineTo(px,py);\n      }\n      ctx.stroke();\n    }\n    \n    // Draw path trail\n    if(pathTrail.length>1){\n      ctx.strokeStyle='rgba(224,177,91,0.6)';ctx.lineWidth=3;\n      ctx.beginPath();ctx.moveTo(pathTrail[0].x,pathTrail[0].y);\n      for(let i=1;i<pathTrail.length;i++){\n        ctx.lineTo(pathTrail[i].x,pathTrail[i].y);\n      }\n      ctx.stroke();\n    }\n    \n    // Draw displacement vector (straight line from start to current)\n    if(showVector===1){\n      arrow(startX,startY,x,y,'#4ea8ff',2.5);\n      glowDot(x,y,6,'rgba(78,168,255,ALPHA)',0.8);\n    }\n    \n    // Draw moving object (ball)\n    glowDot(x,y,5,'rgba(224,177,91,ALPHA)',0.9);\n    ctx.fillStyle='#e0b15b';\n    ctx.beginPath();ctx.arc(x,y,5,0,Math.PI*2);ctx.fill();\n    \n    // Info box\n    ctx.fillStyle='rgba(9,14,18,0.72)';\n    ctx.fillRect(12,H-110,240,100);\n    ctx.strokeStyle='#465a64';ctx.lineWidth=1;\n    ctx.strokeRect(12,H-110,240,100);\n    \n    ctx.fillStyle='var(--accent)';\n    ctx.font='bold '+Math.round(H*0.035)+'px sans-serif';\n    ctx.textAlign='left';\n    ctx.fillText('Distance: '+totalDistance.toFixed(1)+' m',20,H-85);\n    ctx.fillStyle='#4ea8ff';\n    ctx.fillText('Displacement: '+displacement.toFixed(1)+' m',20,H-55);\n    ctx.fillStyle='#a8b4bf';ctx.font=Math.round(H*0.03)+'px sans-serif';\n    ctx.fillText('Ratio: '+(totalDistance>0?(","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"},"simulation_title":"Distance vs Displacement"}},"metadata":{"rendered_at":"2026-05-21T05:55:30.544Z","cache_hit":false,"cost_usd":0},"error":{"code":"RENDER_TIMEOUT","message":"browserType.launch: Executable doesn't exist at /root/.cache/ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell\n╔════════════════════════════════════════════════════════════╗\n║ Looks like Playwright was just installed or updated.       ║\n║ Please run the following command to download new browsers: ║\n║                                                            ║\n║     npx playwright install                                 ║\n║                                                            ║\n║ <3 Playwright Team                                         ║\n╚════════════════════════════════════════════════════════════╝","retryable":true}}