{"job_id":"anim-job-3bcf3a72-cc92-4f95-a95b-ade667840e9d","request_id":"bulk-2026-05-21T06-14-14-458Z-1-a1-physics.08.motion.distance-vs-displacement","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3bcf3a72-cc92-4f95-a95b-ade667840e9d/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3bcf3a72-cc92-4f95-a95b-ade667840e9d/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3bcf3a72-cc92-4f95-a95b-ade667840e9d/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3bcf3a72-cc92-4f95-a95b-ade667840e9d/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3bcf3a72-cc92-4f95-a95b-ade667840e9d/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-3bcf3a72-cc92-4f95-a95b-ade667840e9d","control_count":2,"interactivity":"none","simulation_id":"physics.08.motion.distance_vs_displacement","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-3bcf3a72-cc92-4f95-a95b-ade667840e9d","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-21T06-14-14-458Z"},"exam_type":"neet","asset_type":"simulation","request_id":"bulk-2026-05-21T06-14-14-458Z-1-a1-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</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 they're NOT the same in all conditions</p>\n    <p class=\"formula\">Distance: total path length | Displacement: Δx = x_f - x_i</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.5\" max=\"2\" step=\"0.1\" value=\"1.0\"/></label>\n    <label class=\"control\"><span>Animation Loop</span><input id=\"c-loop\" type=\"range\" min=\"0\" max=\"100\" step=\"1\" value=\"0\" disabled/></label>\n    <ul>\n      <li><strong>Misconception:</strong> Distance = Displacement always</li>\n      <li><strong>Reality:</strong> Equal only on straight paths; differ on curves and when returning</li>\n      <li><strong>Key:</strong> Path shape constrains the relationship</li>\n      <li><strong>Fix:</strong> Measure total path vs final position change</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\":\"pathType\",\"label\":\"Path Type\",\"min\":0,\"max\":2,\"step\":1,\"value\":0,\"units\":\"mode\"},{\"key\":\"speed\",\"label\":\"Speed\",\"min\":0.5,\"max\":2,\"step\":0.1,\"value\":1.0,\"units\":\"m/s\"}];\nfor(const c of controls){\n  const inp=document.getElementById('c-'+c.key);\n  const out=document.getElementById('v-'+c.key);\n  if(inp){\n    inp.addEventListener('input',()=>{\n      if(c.key==='pathType'){\n        const names=['Straight','Circular','Back&Forth'];\n        out.textContent=names[parseInt(inp.value)];\n      }else{\n        out.textContent=inp.value;\n      }\n      window.updateModel?.();\n    });\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  let lastTs=0;\n  \n  // State variables\n  let t=0;\n  let pathType=0;\n  let speed=1.0;\n  let totalDist=0;\n  let posHistory=[];\n  \n  function glowDot(x,y,r,color,a){\n    const g=ctx.createRadialGradient(x,y,0,x,y,r*2.6);\n    const rgba=color.replace(')',','+a+')');\n    g.addColorStop(0,rgba);\n    g.addColorStop(1,color.replace(')',',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;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);\n    ctx.fill();\n  }\n  \n  function getPosition(phase){\n    // phase: 0 to 1 is one full motion cycle\n    const pathType=parseInt(document.getElementById('c-pathType').value);\n    const W=cv.width,H=cv.height;\n    const centerX=W*0.35;\n    const centerY=H*0.5;\n    \n    if(pathType===0){ // Straight line\n      const x=centerX-150+phase*300;\n      return {x,y:centerY,label:'Straight'};\n    }else if(pathType===1){ // Circle\n      const angle=phase*Math.PI*2;\n      const rad=100;\n      const x=centerX+rad*Math.cos(angle);\n      const y=centerY+rad*Math.sin(angle);\n      return {x,y,label:'Circular'};\n    }else{ // Back and forth\n      let p;\n      if(phase<0.5){\n        p=phase*2; // 0→1: go right\n        return {x:centerX-150+p*300,y:centerY,label:'Back'};\n      }else{\n        p=(phase-0.5)*2; // 0→1: go left\n        return {x:centerX+150-p*300,y:centerY,label:'Forth'};\n      }\n    }\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    pathType=parseInt(document.getElementById('c-pathType').value);\n    speed=parseFloat(document.getElementById('c-speed').value);\n    \n    // Update time (15 second cycle)\n    const cycleDuration=15;\n    t+=(dt*speed)/cycleDuration;\n    const phase=(t%1);\n    \n    const pos=getPosition(phase);\n    \n    // Accumulate distance\n    if(posHistory.length>0){\n      const last=posHistory[posHistory.length-1];\n      const dx=pos.x-last.x;\n      const dy=pos.y-last.y;\n      const segDist=Math.sqrt(dx*dx+dy*dy);\n      totalDist+=segDist*0.01; // scale factor for units\n    }\n    posHistory.push({x:pos.x,y:pos.y});\n    if(posHistory.length>300)posHistory.shift();\n    \n    // Get initial and final positions\n    const startPos=getPosition(0);\n    const disp=Math.sqrt((pos.x-startPos.x)*(pos.x-startPos.x)+(pos.y-startPos.y)*(pos.y-startPos.y));\n    \n    // Clear & draw background\n    ctx.fillStyle='rgba(20,27,36,0.6)';ctx.fillRect(0,0,W,H);\n    \n    // Draw grid\n    ctx.strokeStyle='rgba(59,74,85,0.25)';ctx.lineWidth=1;\n    for(let i=0;i<=W;i+=50){ctx.beginPath();ctx.moveTo(i,0);ctx.lineTo(i,H);ctx.stroke();}\n    for(let i=0;i<=H;i+=50){ctx.beginPath();ctx.moveTo(0,i);ctx.lineTo(W,i);ctx.stroke();}\n    \n    // Draw starting position\n    ctx.fillStyle='rgba(142,220,176,0.3)';ctx.beginPath();ctx.arc(startPos.x,startPos.y,12,0,Math.PI*2);ctx.fill();\n    ctx.strokeStyle='#8decb0';ctx.lineWidth=1.5;ctx.stroke();\n    \n    // Draw path/trail\n    ctx.strokeStyle='rgba(78,168,255,0.4)';ctx.lineWidth=2;ctx.beginPath();\n    if(posHistory.length>0){\n      ctx.moveTo(posHistory[0].x,posHistory[0].y);\n      for(let i=1;i<posHistory.length;i++){\n        ctx.lineTo(posHistory[i].x,posHistory[i].y);\n      }\n      ctx.stroke();\n    }\n    \n    // Draw current position & velocity vector\n    glowDot(pos.x,pos.y,6,'rgba(224,177,91,ALPHA)',0.6);\n    ctx.fillStyle='#e0b15b';ctx.beginPath();ctx.arc(pos.x,pos.y,5.5,0,Math.PI*2);ctx.fill();\n    \n    // Velocity vector (tangent to path)\n    const nextPhase=Math.min(phase+0.01,1);\n    const nextPos=getPosition(nextPhase);\n    const vel={x:(nextPos.x-pos.x)*50,y:(nextPos.y-pos.y)*50};\n    arrow(pos.x,pos.y,pos.x+vel.x,pos.y+vel.y,'#e0b15b');\n    \n    // Draw displacement vector\n    arrow(startPos.x,startPos.y,pos.x,pos.y,'#8decb0');\n    \n    // Labels and metrics\n    ctx.fillStyle='var(--text)';\n    ctx.font=Math.round(H*0.04)+'px sans-serif';\n    ctx.fillStyle='#8decb0';\n    ctx.fillText('START',startPos.x-25,startPos.y-18);\n    \n    ctx.fillStyle='#e0b15b';\n    ctx.fillText('NOW',pos.x-15,pos.y-18);\n    \n    ctx.fillStyle='#4ea8ff';\n    ctx.fillText('PATH →',pos.x-35,pos.y+30);\n    \n    // Info panel\n    ctx.fillStyle='rgba(28,35,46,0.85)';ctx.fillRect(W*0.54,12,W*0.42,H*0.35);\n    ctx.strokeStyle='rgba(59,74,85,0.6)';ctx.lineWidth=1;ctx.stroke();\n    \n    ctx.fillStyle='#e0b15b';ctx.font='bold '+Math.round(H*0.05)+'px sans-serif';\n    ctx.fillText('Path: '+['Straight','Circular','Back&Forth'][pathType],W*0.58,40);\n    \n    ctx.fillStyle='var(--muted)';ctx.font=Math.round(H*0.035)+'px sans-serif';\n    ctx.fillText('Distance (path): '+totalDist.toFixed(1)+' m',W*0.58,70);\n    ctx.fillText('Displacement: '+disp.toFixed(1)+' px',W*0.58,100);\n    const ratio=(disp>0.5)?((disp/totalDist).toFixed(2)):'−';\n    ctx.fillText('Ratio Δx/d: '+ratio,W*0.58,130);\n    \n    // Comparison\n    const isSame=Math.abs(disp-totalDist)<5;\n    ctx.fillStyle=isSame?'#8decb0':'#df8279';\n    ctx.font='bold '+Math.round(H*0.04)+'px sans-serif';\n    ctx.fillText(isSame?'✓ EQUAL':'✗ DIFFERENT',W*0.58,170);\n    \n    // Concept indicator\n    ctx.fillStyle='rgba(198,107,94,0.2)';ctx.fillRect(W*0.54,H-90,W*0.42,70);\n    ctx.fillStyle='#df8279';ctx.font=Math.round(H*0.032)+'px sans-serif';\n    ctx.fillText('❌ Misconception: \"Always equal\"',W*0.58,H-60);\n    ctx.fillStyle='#8decb0';\n    ctx.fillText('✓ Truth: Depends on PATH',W*0.58,H-30);\n    \n    document.getElementById('legend').textContent='Phase: '+(phase","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"},"simulation_title":"Distance vs Displacement"}},"metadata":{"rendered_at":"2026-05-21T06:19:51.806Z","cache_hit":false,"cost_usd":0},"error":{"code":"RENDER_TIMEOUT","message":"browserType.launch: Target page, context or browser has been closed\nBrowser logs:\n\n<launching> /ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-edgeupdater --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate,AutoDeElevate,RenderDocument,OptimizationHints,msForceBrowserSignIn,msEdgeUpdateLaunchServicesPreferredVersion --enable-features=CDPScreenshotNewSurface --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --edge-skip-compat-layer-relaunch --disable-infobars --disable-search-engine-choice-screen --disable-sync --enable-unsafe-swiftshader --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-sandbox --disable-dev-shm-usage --user-data-dir=/tmp/playwright_chromiumdev_profile-9e8DSk --remote-debugging-pipe --no-startup-window\n<launched> pid=30\n[pid=30][err] /ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell: error while loading shared libraries: libXfixes.so.3: cannot open shared object file: No such file or directory\nCall log:\n  - <launching> /ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-edgeupdater --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate,AutoDeElevate,RenderDocument,OptimizationHints,msForceBrowserSignIn,msEdgeUpdateLaunchServicesPreferredVersion --enable-features=CDPScreenshotNewSurface --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --edge-skip-compat-layer-relaunch --disable-infobars --disable-search-engine-choice-screen --disable-sync --enable-unsafe-swiftshader --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-sandbox --disable-dev-shm-usage --user-data-dir=/tmp/playwright_chromiumdev_profile-9e8DSk --remote-debugging-pipe --no-startup-window\n  - <launched> pid=30\n  - [pid=30][err] /ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell: error while loading shared libraries: libXfixes.so.3: cannot open shared object file: No such file or directory\n  - [pid=30] <gracefully close start>\n  - [pid=30] <kill>\n  - [pid=30] <will force kill>\n  - [pid=30] <process did exit: exitCode=127, signal=null>\n  - [pid=30] starting temporary directories cleanup\n  - [pid=30] finished temporary directories cleanup\n  - [pid=30] <gracefully close end>\n","retryable":true}}