{"job_id":"anim-job-8cbcaa6f-f693-4b25-ac18-c8742336dc2b","request_id":"bulk-2026-05-20T10-21-44-856Z-20-physics.11.work-energy.conservation-on-track","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-8cbcaa6f-f693-4b25-ac18-c8742336dc2b/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-8cbcaa6f-f693-4b25-ac18-c8742336dc2b/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-8cbcaa6f-f693-4b25-ac18-c8742336dc2b/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-8cbcaa6f-f693-4b25-ac18-c8742336dc2b/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-8cbcaa6f-f693-4b25-ac18-c8742336dc2b/scene-source.json","duration_seconds":15,"byte_size":478538,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-8cbcaa6f-f693-4b25-ac18-c8742336dc2b","interactivity":"none","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-8cbcaa6f-f693-4b25-ac18-c8742336dc2b","request":{"gap":{"topic":"work_energy-conservation_on_track","severity":"moderate","error_type":"concept_misunderstanding","memory_state":"fragile","display_topic":"Conservation of Energy on Track","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":"11","language":"en"},"interactivity":"none","duration_seconds":15},"context":{"chapter":{"name":"Work, Energy & Power","ncert_class":11},"sub_topics":[{"topic":"work_energy-conservation_on_track","key_concepts":["Conservation of Energy on Track","Work, Energy & Power"]}]},"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-20-physics.11.work-energy.conservation-on-track","subject_area":"physics"},"renderer":"html_three_js_local","storyboard":{"beats":[{"label":"Topic","visual":"Show the topic title and the key physical context.","narration":"Conservation of Energy on Track"},{"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":"Conservation of Energy on Track. Work, Energy & Power"}],"title":"Conservation of Energy on Track","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>Conservation of Energy: Conditions Matter</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%,#0e121a 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>Conservation of Energy: Conditions Matter</h1>\n    <p class=\"sub\">Energy is NOT always conserved the same way. Friction, constraints, and reference frames change the outcome.</p>\n    <p class=\"formula\">KE + PE = E<sub>total</sub> + E<sub>friction</sub></p>\n    <label class=\"control\"><span>Friction: <strong id=\"v-friction\">0</strong> N</span><input id=\"c-friction\" type=\"range\" min=\"0\" max=\"50\" step=\"1\" value=\"0\"/></label>\n    <label class=\"control\"><span>Track Angle: <strong id=\"v-angle\">0</strong>°</span><input id=\"c-angle\" type=\"range\" min=\"0\" max=\"45\" step=\"5\" value=\"0\"/></label>\n    <label class=\"control\"><span>Speed: <strong id=\"v-speed\">100</strong>%</span><input id=\"c-speed\" type=\"range\" min=\"50\" max=\"150\" step=\"10\" value=\"100\"/></label>\n    <ul>\n      <li><strong style=\"color:var(--accent);\">✓ Frictionless:</strong> E<sub>KE</sub> + E<sub>PE</sub> = const</li>\n      <li><strong style=\"color:var(--red);\">✗ With friction:</strong> Loss of KE + PE to heat</li>\n      <li><strong style=\"color:var(--green);\">Fix:</strong> Account for all forces &amp; energy transfers</li>\n      <li>Check: constraints, friction, external work</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\":\"friction\",\"label\":\"Friction\",\"min\":0,\"max\":50,\"step\":1,\"value\":0,\"units\":\"N\"},\n  {\"key\":\"angle\",\"label\":\"Track Angle\",\"min\":0,\"max\":45,\"step\":5,\"value\":0,\"units\":\"°\"},\n  {\"key\":\"speed\",\"label\":\"Speed\",\"min\":50,\"max\":150,\"step\":10,\"value\":100,\"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  let lastTs=0;\n  \n  // Physics state\n  let ballX=0, ballY=0, ballVx=0, ballVy=0;\n  let time=0;\n  let energyKE=0, energyPE=0, energyLoss=0;\n  let trailPoints=[];\n  let impactRing=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*0.8)));\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;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.04,(ts-lastTs)/1000);lastTs=ts;\n    const W=cv.width,H=cv.height;\n    \n    // Read sliders\n    const friction=Number(document.getElementById('c-friction').value);\n    const angle=Number(document.getElementById('c-angle').value)*Math.PI/180;\n    const speedScale=Number(document.getElementById('c-speed').value)/100;\n    \n    // Physics constants\n    const mass=2;\n    const g=9.8;\n    const trackLength=W*0.6;\n    const ballRadius=8;\n    \n    // Track start/end in world space\n    const trackStartX=W*0.1;\n    const trackStartY=H*0.5;\n    const trackEndX=trackStartX+trackLength;\n    const trackEndY=trackStartY+trackLength*Math.sin(angle);\n    \n    // Update time\n    time+=dt;\n    \n    // Initial velocity (from speed slider)\n    const initialVel=3*speedScale;\n    \n    // Position along track (0 to 1)\n    let s=0.5+0.3*Math.sin(time*1.8);\n    s=Math.max(0,Math.min(1,s));\n    \n    // Ball position on incline\n    ballX=trackStartX+s*trackLength;\n    ballY=trackStartY+s*trackLength*Math.sin(angle);\n    \n    // Height relative to start\n    const height=s*trackLength*Math.sin(angle);\n    \n    // Velocity along track (affected by gravity and friction)\n    const gravComponent=g*Math.sin(angle);\n    const frictionComponent=(friction/mass)*g;\n    const netAccel=gravComponent-frictionComponent;\n    \n    ballVx=(initialVel+netAccel*time)*speedScale;\n    \n    // Clamp position\n    if(ballX>trackEndX){s=1;ballX=trackEndX;ballY=trackEndY;ballVx=0;}\n    if(ballX<trackStartX){s=0;ballX=trackStartX;ballY=trackStartY;ballVx=0;}\n    \n    // Energy calculations\n    energyPE=mass*g*height;\n    energyKE=0.5*mass*(ballVx*ballVx+ballVy*ballVy);\n    if(friction>0){\n      energyLoss+=friction*ballVx*dt;\n    }\n    const totalEnergy=energyKE+energyPE+energyLoss;\n    \n    // Trail\n    trailPoints.push({x:ballX,y:ballY});\n    if(trailPoints.length>25)trailPoints.shift();\n    \n    // Impact ring\n    impactRing=Math.max(0,impactRing-dt*3);\n    \n    // === DRAW ===\n    ctx.clearRect(0,0,W,H);\n    \n    // === LAYER 1: Background grid ===\n    ctx.strokeStyle='rgba(48,52,73,0.4)';ctx.lineWidth=1;\n    for(let i=0;i<=4;i++){\n      const x=W*i/4;\n      ctx.beginPath();ctx.moveTo(x,0);ctx.lineTo(x,H);ctx.stroke();\n    }\n    \n    // === LAYER 2: Track ===\n    ctx.strokeStyle=friction>0?'rgba(223,130,121,0.5)':'rgba(141,236,176,0.6)';\n    ctx.lineWidth=3;ctx.beginPath();ctx.moveTo(trackStartX,trackStartY);ctx.lineTo(trackEndX,trackEndY);ctx.stroke();\n    \n    // Normal force indicator\n    const normalX=ballX-5*Math.sin(angle);\n    const normalY=ballY+5*Math.cos(angle);\n    arrow(ballX,ballY,normalX,normalY,'rgba(98,125,165,0.7)',2);\n    \n    // === LAYER 3: Ball and motion ===\n    // Trail\n    if(trailPoints.length>1){\n      ctx.strokeStyle=friction>0?'rgba(223,130,121,0.3)':'rgba(141,236,176,0.3)';\n      ctx.lineWidth=2;ctx.beginPath();ctx.moveTo(trailPoints[0].x,trailPoints[0].y);\n      for(let i=1;i<trailPoints.length;i++){\n        ctx.lineTo(trailPoints[i].x,trailPoints[i].y);\n      }ctx.stroke();\n    }\n    \n    // Glow pulse\n    const pulseAlpha=0.3+0.2*Math.sin(time*4);\n    glowDot(ballX,ballY,ballRadius+2,friction>0?'rgba(223,130,121,ALPHA)':'rgba(141,236,176,ALPHA)',pulseAlpha);\n    \n    // Ball body\n    ctx.fillStyle=friction>0?'#df8279':'#8decb0';\n    ctx.beginPath();ctx.arc(ballX,ballY,ballRadius,0,Math.PI*2);ctx.fill();\n    \n    // Velocity vector\n    const velScale=15;\n    arrow(ballX,ballY,ballX+ballVx*velScale*0.1,ballY,friction>0?'rgba(223,130,121,0.8)':'rgba(141,236,176,0.8)',2);\n    \n    // === LAYER 4: Energy bars on right side ===\n    const graphX=W*0.82;const graphY=H*0.65;const graphW=100;const graphH=80;\n    \n    // Outline\n    ctx.strokeStyle='#465a64';ctx.lineWidth=1;ctx.strokeRect(graphX,graphY,graphW,graphH);\n    \n    // KE bar (green/red)\n    const keH=Math.min(graphH,Math.max(0,energyKE/20));\n    ctx.fillStyle=friction>0?'rgba(223,130,121,0.7)':'rgba(141,236,176,0.7)';\n    ctx.fillRect(graphX+5,graphY+graphH-keH,20,keH);\n    ctx.fillStyle='var(--muted)';ctx.font='10px sans-serif';ctx.fillText('KE',graphX+6,graphY+graphH+12);\n    \n    // PE bar (blue)\n    const peH=Math.min(graphH,Math.max(0,energyPE/20));\n    ctx.fillStyle='rgba(98,125,165,0.7)';\n    ctx.fillRect(graphX+30,graphY+graphH-peH,20,peH);\n    ctx.fillText('PE',graphX+31,graphY+graphH+12);\n    \n    // Friction loss bar (red)\n    const lossH=Math.min(graphH,Math.max(0,energyLoss/20));\n    ctx.fillStyle='rgba(223,130,121,0.7)';\n    ctx.fillRect(graphX+55,graphY+graphH-lossH,20,lossH);\n    ctx.fillText('Loss',graphX+52,graphY+graphH+12);\n    \n    // Total bar (white outline)\n    const totH=Math.min(graphH,Math.max(0,totalEnergy/20));\n    ctx.strokeStyle='rgba(250,249,248,0.8)';ctx.lineWidth=2;\n    ctx.strokeRect(graphX+75,graphY+graphH-totH,16,totH);\n    ctx.fillText('Total',graphX+72,graphY+graphH+12);\n    \n    // === LAYER 5: Status & annotations ===\n    // Condition label","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"}}},"metadata":{"rendered_at":"2026-05-20T11:48:53.700Z","cache_hit":false,"cost_usd":0},"error":null}