{"job_id":"anim-job-aaa31b3d-392f-4a0a-8c15-7637764a6165","request_id":"bulk-2026-05-20T12-50-22-156Z-2-physics.08.force-pressure.balanced-vs-unbalanced","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaa31b3d-392f-4a0a-8c15-7637764a6165/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaa31b3d-392f-4a0a-8c15-7637764a6165/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaa31b3d-392f-4a0a-8c15-7637764a6165/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaa31b3d-392f-4a0a-8c15-7637764a6165/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-aaa31b3d-392f-4a0a-8c15-7637764a6165/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-aaa31b3d-392f-4a0a-8c15-7637764a6165","interactivity":"none","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-aaa31b3d-392f-4a0a-8c15-7637764a6165","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-20T12-50-22-156Z"},"exam_type":"neet","asset_type":"simulation","request_id":"bulk-2026-05-20T12-50-22-156Z-2-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    .icon-box{display:inline-block;width:16px;height:16px;margin-right:6px;vertical-align:-2px;}\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 depend on constraints. Same object, different rules apply.</p>\n    <p class=\"formula\">ΣF = ma</p>\n    <label class=\"control\"><span>Applied Force: <strong id=\"v-force\">5</strong> N</span><input id=\"c-force\" type=\"range\" min=\"0\" max=\"15\" step=\"1\" value=\"5\"/></label>\n    <label class=\"control\"><span>Friction: <strong id=\"v-friction\">3</strong> N</span><input id=\"c-friction\" type=\"range\" min=\"0\" max=\"10\" step=\"0.5\" value=\"3\"/></label>\n    <label class=\"control\"><span>Constraint: <strong id=\"v-constraint\">0</strong></span><input id=\"c-constraint\" type=\"range\" min=\"0\" max=\"1\" step=\"1\" value=\"0\"/></label>\n    <ul>\n      <li><span class=\"icon-box\">⚠</span><strong>Mistake:</strong> Same result every time.</li>\n      <li><span class=\"icon-box\">✓</span><strong>Truth:</strong> Constraints change the outcome.</li>\n      <li><span class=\"icon-box\">→</span><strong>Key:</strong> Check if ΣF ≠ 0 first!</li>\n    </ul>\n  </aside>\n  <section>\n    <div class=\"stage\" id=\"stage\">\n      <div class=\"legend\" id=\"legend\">Free object</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\":15,\"step\":1,\"value\":5,\"units\":\"N\"},{\"key\":\"friction\",\"label\":\"Friction\",\"min\":0,\"max\":10,\"step\":0.5,\"value\":3,\"units\":\"N\"},{\"key\":\"constraint\",\"label\":\"Constraint (Wall)\",\"min\":0,\"max\":1,\"step\":1,\"value\":0,\"units\":\"\"}];\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\n  let pos = { x: 0, y: 0 };\n  let vel = { x: 0, y: 0 };\n  let accel = { x: 0, y: 0 };\n  let forceTrail = [];\n  let time = 0;\n  let phase = 0; // for cycling through scenarios\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) {\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;\n    ctx.lineWidth = 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 smooth(current, target, rate, dt) {\n    return current + (target - current) * (1 - Math.exp(-rate * dt));\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 friction = Number(document.getElementById('c-friction').value);\n    const hasWall = Number(document.getElementById('c-constraint').value) === 1;\n\n    time += dt;\n    phase = Math.floor(time / 3.75) % 2; // Cycle every 3.75 seconds\n\n    // Physics\n    let netForce = appliedForce;\n    let canMove = true;\n\n    if (hasWall) {\n      // Constrained scenario: check if net force can overcome static friction\n      if (Math.abs(netForce) <= friction) {\n        canMove = false;\n        netForce = 0; // Wall provides normal force to balance\n        vel.x = 0;\n        accel.x = 0;\n      }\n    }\n\n    if (canMove) {\n      // Free or constrained but overcoming friction\n      const mass = 2; // kg\n      const kineticFriction = appliedForce > 0 ? -friction * 0.7 : friction * 0.7;\n      netForce = appliedForce + kineticFriction;\n      accel.x = netForce / mass;\n      vel.x += accel.x * dt;\n      vel.x *= 0.92; // Drag\n      pos.x += vel.x * dt;\n    } else {\n      accel.x = 0;\n    }\n\n    // Store in trail\n    forceTrail.push({ x: pos.x, netForce: netForce, canMove: canMove });\n    if (forceTrail.length > 60) forceTrail.shift();\n\n    // === Drawing ===\n    ctx.clearRect(0, 0, W, H);\n\n    // Background layers\n    ctx.fillStyle = 'rgba(20, 27, 34, 0.3)';\n    ctx.fillRect(0, 0, W, H);\n\n    const centerY = H * 0.55;\n    const centerX = W * 0.35 + pos.x * 30; // Scale position for visual\n\n    // === Draw scenario label ===\n    ctx.fillStyle = '#a8b4bf';\n    ctx.font = Math.round(H * 0.045) + 'px sans-serif';\n    ctx.textAlign = 'left';\n    if (hasWall) {\n      ctx.fillText('Constrained by Wall', W * 0.08, H * 0.12);\n      ctx.fillStyle = '#4ea8ff';\n      ctx.font = Math.round(H * 0.035) + 'px sans-serif';\n      ctx.fillText('(Static friction may prevent motion)', W * 0.08, H * 0.17);\n    } else {\n      ctx.fillText('Free Object', W * 0.08, H * 0.12);\n      ctx.fillStyle = '#4ea8ff';\n      ctx.font = Math.round(H * 0.035) + 'px sans-serif';\n      ctx.fillText('(Always accelerates if F ≠ 0)', W * 0.08, H * 0.17);\n    }\n\n    // === Draw ground ===\n    ctx.strokeStyle = '#3b4a55';\n    ctx.lineWidth = 1;\n    ctx.beginPath();\n    ctx.moveTo(0, centerY + 40);\n    ctx.lineTo(W, centerY + 40);\n    ctx.stroke();\n\n    // Hatching for ground\n    ctx.strokeStyle = '#2a3a45';\n    ctx.lineWidth = 0.8;\n    for (let i = 0; i < W; i += 12) {\n      ctx.beginPath();\n      ctx.moveTo(i, centerY + 40);\n      ctx.lineTo(i + 8, centerY + 52);\n      ctx.stroke();\n    }\n\n    // === Draw wall if constrained ===\n    if (hasWall) {\n      ctx.fillStyle = '#465a64';\n      ctx.fillRect(W * 0.65, centerY - 60, 8, 120);\n      ctx.fillStyle = '#a8b4bf';\n      ctx.font = Math.round(H * 0.032) + 'px sans-serif';\n      ctx.textAlign = 'center';\n      ctx.fillText('Wall', W * 0.65 + 4, centerY + 70);\n    }\n\n    // === Draw object (box) ===\n    const boxSize = 24;\n    ctx.fillStyle = canMove ? '#8decb0' : '#df8279';\n    glowDot(centerX, centerY, boxSize / 2, canMove ? 'rgba(141, 236, 176, ALPHA)' : 'rgba(223, 130, 121, ALPHA)', 0.3);\n    ctx.fillRect(centerX - boxSize / 2, centerY - boxSize / 2, boxSize, boxSize);\n\n    // Object label\n    ctx.fillStyle = '#101417';\n    ctx.font = 'bold ' + Math.round(H * 0.028) + 'px sans-serif';\n    ctx.textAlign = 'center';\n    ctx.textBaseline = 'middle';\n    ctx.fillText('m', centerX, centerY);\n\n    // === Draw forces ===\n    const forceScale = 25;\n\n    // Applied force arrow (always pointing right)\n    const appliedX = centerX + appliedForce * forceScale;\n    arrow(centerX - boxSize / 2 - 8, centerY, appliedX, centerY, '#e0b15b');\n    ctx.fillStyle = '#e0b15b';\n    ctx.font = Math.round(H * 0.032) + 'px sans-serif';\n    ctx.textAlign = 'center';\n    ctx.fillText('F_app', (centerX + appliedX) / 2, centerY - 18);\n\n    // Friction arrow (opposing motion, if moving)\n    if (canMove && Math.abs(vel.x) > 0.01) {\n      const fricX = centerX - friction * forceScale * Math.sign(vel.x);\n      arrow(centerX + boxSize / 2 + 8, centerY, fricX, centerY, '#c66b5e');\n      ctx.fillStyle = '#c66b5e';\n      ctx.font = Math.round(H * 0.032) + 'px sans-serif';\n      ctx.textAlign = 'center';\n      ctx.fillText('f_k', (centerX + fricX) / 2, centerY + 20);\n    }\n\n    // Static friction indicator\n    if (!canMove && appliedForce > 0) {\n      ctx.fillStyle = 'rgba(198, 107, 94, 0.5)';\n      ctx.strokeStyle = '#c66b5e';\n      ctx.lineWidth = 1.5;\n      ctx.setLineDash([4, 3]);\n      ctx.beginPath();\n      ctx.arc(centerX, centerY, boxSize / 2 + 12, 0, Math.PI * 2);\n      ctx.stroke();\n      ctx.setLineDash([]);\n      ctx.fillStyle = '#c66b5e';\n      ctx.font = Math.round(H * 0.028) + 'px sans-serif';\n      ctx.textAlign = 'center';\n      ctx.fillText('","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"}}},"metadata":{"rendered_at":"2026-05-20T13:01:30.963Z","cache_hit":false,"cost_usd":0},"error":null}