{"job_id":"anim-job-aaf454fc-6319-4d42-96b7-0b2081cc34cf","request_id":"bulk-2026-05-21T02-24-03-126Z-2-a1-physics.08.force-pressure.balanced-vs-unbalanced","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaf454fc-6319-4d42-96b7-0b2081cc34cf/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaf454fc-6319-4d42-96b7-0b2081cc34cf/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaf454fc-6319-4d42-96b7-0b2081cc34cf/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaf454fc-6319-4d42-96b7-0b2081cc34cf/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaf454fc-6319-4d42-96b7-0b2081cc34cf/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-aaf454fc-6319-4d42-96b7-0b2081cc34cf","interactivity":"none","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-aaf454fc-6319-4d42-96b7-0b2081cc34cf","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-21T02-24-03-126Z"},"exam_type":"neet","asset_type":"simulation","request_id":"bulk-2026-05-21T02-24-03-126Z-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:#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>Balanced vs Unbalanced Forces</h1>\n    <p class=\"sub\">Forces change motion differently based on net force</p>\n    <p class=\"formula\">F_net = ΣF  →  a = F_net / m</p>\n    <label class=\"control\"><span>Applied Force: <strong id=\"v-force\">50</strong> N</span><input id=\"c-force\" type=\"range\" min=\"0\" max=\"100\" step=\"5\" value=\"50\"/></label>\n    <label class=\"control\"><span>Friction: <strong id=\"v-friction\">50</strong> N</span><input id=\"c-friction\" type=\"range\" min=\"0\" max=\"100\" step=\"5\" value=\"50\"/></label>\n    <label class=\"control\"><span>Mass: <strong id=\"v-mass\">10</strong> kg</span><input id=\"c-mass\" type=\"range\" min=\"5\" max=\"30\" step=\"1\" value=\"10\"/></label>\n    <ul>\n      <li><strong>Balanced:</strong> F_net = 0 → no acceleration</li>\n      <li><strong>Unbalanced:</strong> F_net ≠ 0 → acceleration occurs</li>\n      <li><strong>Key:</strong> Outcome depends on which forces dominate</li>\n      <li><strong>Reality:</strong> Same force produces different results under different constraints</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\":\"force\",\"label\":\"Applied Force\",\"min\":0,\"max\":100,\"step\":5,\"value\":50,\"units\":\"N\"},{\"key\":\"friction\",\"label\":\"Friction\",\"min\":0,\"max\":100,\"step\":5,\"value\":50,\"units\":\"N\"},{\"key\":\"mass\",\"label\":\"Mass\",\"min\":5,\"max\":30,\"step\":1,\"value\":10,\"units\":\"kg\"}];\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  // State variables\n  let x = 0, v = 0, a = 0;\n  let phase = 0;\n  let glowAlpha = 0;\n  const accelHistory = [];\n  const posHistory = [];\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;\n    ctx.beginPath();\n    ctx.arc(x, y, r * 2.6, 0, Math.PI * 2);\n    ctx.fill();\n  }\n  \n  function arrow(x1, y1, x2, y2, color, width) {\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;\n    ctx.lineWidth = width || 2.5;\n    ctx.beginPath();\n    ctx.moveTo(x1, y1);\n    ctx.lineTo(x2, y2);\n    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 tick(ts) {\n    const dt = Math.min(0.04, (ts - lastTs) / 1000);\n    lastTs = ts;\n    const W = cv.width, H = cv.height;\n    \n    // Read sliders\n    const appliedForce = Number(document.getElementById('c-force').value);\n    const frictionForce = Number(document.getElementById('c-friction').value);\n    const mass = Number(document.getElementById('c-mass').value);\n    \n    // Physics: F_net = applied - friction\n    const netForce = appliedForce - frictionForce;\n    a = netForce / mass;\n    \n    // Update velocity and position\n    v += a * dt;\n    x += v * dt;\n    \n    // Damping to prevent runaway\n    if (Math.abs(v) < 0.1) v = 0;\n    \n    // Clamp position to stage bounds\n    const maxX = 240;\n    if (x > maxX) { x = maxX; v = 0; }\n    if (x < -maxX) { x = -maxX; v = 0; }\n    \n    // History for trail\n    accelHistory.push(a);\n    posHistory.push(x);\n    if (accelHistory.length > 120) accelHistory.shift();\n    if (posHistory.length > 120) posHistory.shift();\n    \n    // Glow pulse tied to force imbalance\n    const imbalance = Math.abs(netForce);\n    glowAlpha = Math.sin(phase * 0.08) * 0.4 + 0.3;\n    if (imbalance < 5) glowAlpha *= 0.3;\n    \n    phase += 1;\n    \n    // Draw scene\n    ctx.clearRect(0, 0, W, H);\n    \n    // === BACKGROUND LAYER ===\n    ctx.fillStyle = 'rgba(25, 40, 50, 0.3)';\n    ctx.fillRect(0, 0, W, H);\n    \n    // Grid lines\n    ctx.strokeStyle = 'rgba(59, 74, 85, 0.2)';\n    ctx.lineWidth = 1;\n    for (let i = 0; i < W; i += 60) {\n      ctx.beginPath();\n      ctx.moveTo(i, 0);\n      ctx.lineTo(i, H);\n      ctx.stroke();\n    }\n    \n    // === MAIN ACTION LAYER ===\n    const groundY = H * 0.62;\n    const blockW = 50, blockH = 40;\n    const blockX = W / 2 + x;\n    \n    // Draw ground/surface\n    ctx.fillStyle = '#3B4A55';\n    ctx.fillRect(0, groundY, W, H - groundY);\n    ctx.strokeStyle = '#A8B4BF';\n    ctx.lineWidth = 2;\n    ctx.beginPath();\n    ctx.moveTo(0, groundY);\n    ctx.lineTo(W, groundY);\n    ctx.stroke();\n    \n    // Draw friction indicator below ground\n    ctx.fillStyle = 'rgba(223, 130, 121, 0.3)';\n    ctx.fillRect(blockX - blockW / 2, groundY + 2, blockW, 12);\n    \n    // Draw block with glow if unbalanced\n    if (Math.abs(netForce) > 5) {\n      glowDot(blockX, groundY - blockH / 2, blockW * 0.6, 'rgba(78, 168, 255, ALPHA)', glowAlpha * 0.7);\n    }\n    \n    ctx.fillStyle = '#4EA8FF';\n    ctx.fillRect(blockX - blockW / 2, groundY - blockH, blockW, blockH);\n    ctx.strokeStyle = '#F3F7FA';\n    ctx.lineWidth = 1.5;\n    ctx.strokeRect(blockX - blockW / 2, groundY - blockH, blockW, blockH);\n    \n    // Draw velocity vector (green)\n    if (Math.abs(v) > 0.5) {\n      const vScale = 20;\n      arrow(blockX, groundY - blockH / 2, blockX + v * vScale, groundY - blockH / 2, '#8decb0', 2);\n    }\n    \n    // === FORCE ARROWS LAYER ===\n    const arrowStartY = groundY - blockH / 2;\n    const arrowScale = 0.8;\n    \n    // Applied force (blue, right)\n    if (appliedForce > 2) {\n      arrow(blockX - blockW / 2 - 8, arrowStartY, \n            blockX - blockW / 2 - 8 - appliedForce * arrowScale, arrowStartY, \n            '#4EA8FF', 3);\n    }\n    \n    // Friction force (red, left)\n    if (frictionForce > 2) {\n      arrow(blockX + blockW / 2 + 8, arrowStartY, \n            blockX + blockW / 2 + 8 + frictionForce * arrowScale, arrowStartY, \n            '#df8279', 3);\n    }\n    \n    // Net force indicator (highlight)\n    if (Math.abs(netForce) > 3) {\n      const netDir = netForce > 0 ? -1 : 1;\n      ctx.strokeStyle = netForce > 0 ? '#8decb0' : '#df8279';\n      ctx.lineWidth = 4;\n      ctx.setLineDash([6, 3]);\n      ctx.beginPath();\n      ctx.moveTo(blockX, groundY - blockH / 2 - 35);\n      ctx.lineTo(blockX, groundY - blockH / 2 - 35 + 25);\n      ctx.stroke();\n      ctx.setLineDash([]);\n    }\n    \n    // === LABELS & ANNOTATIONS ===\n    ctx.font = Math.round(H * 0.035) + 'px sans-serif';\n    ctx.fillStyle = '#F3F7FA';\n    ctx.textAlign = 'left';\n    \n    // Title\n    ctx.font = 'bold ' + Math.round(H * 0.045) + 'px sans-serif';\n    const balanced = Math.abs(netForce) < 5;\n    ctx.fillStyle = balanced ? '#A8B4BF' : '#E0B15B';\n    ctx.fillText(balanced ? '⚖ BALANCED FORCES' : '⚠ UNBALANCED FORCES', W / 2 - 100, H * 0.08);\n    \n    ctx.font = Math.round(H * 0.032) + 'px sans-serif';\n    ctx.fillStyle = '#A8B4BF';\n    \n    // Force labels\n    if (appliedForce > 2) {\n      ctx.fillStyle = '#4EA8FF';\n      ctx.textAlign = 'right';\n      ctx.fillText('Applied: ' + appliedForce.toFixed(0) + 'N', blockX - blockW / 2 - 15, arrowStartY - 12);\n    }\n    \n    if (frictionForce > 2) {\n      ctx.fillStyle = '#df8279';\n      ctx.textAlign = 'left';\n      ctx.fillText('Friction: ' + frictionForce.toFixed(0) + 'N', blockX + blockW / 2 + 15, arrowStartY - 12);\n    }\n    \n    // Net force & acceleration\n    ctx.font = Math.round(H * 0.036) + 'px sans-serif';\n    ctx.fillStyle = '#E0B15B';\n    ctx.textAlign = 'center';\n    ctx.fillText('F_net = ' + netForce.toFixed(1) + 'N', W /","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"}}},"metadata":{"rendered_at":"2026-05-21T02:32:17.104Z","cache_hit":false,"cost_usd":0},"error":null}