{"job_id":"anim-job-3547404f-1bcf-4dd3-adf7-ba7f3a8be428","request_id":"test-physics-wave-fef4a9a4-ee3c-4109-9b59-ca80c158fc36-1778702709883","status":"complete","asset":{"primary_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3547404f-1bcf-4dd3-adf7-ba7f3a8be428/walkthrough.mp4","thumbnail_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3547404f-1bcf-4dd3-adf7-ba7f3a8be428/thumb.jpg","transcript_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3547404f-1bcf-4dd3-adf7-ba7f3a8be428/transcript.vtt","interactive_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3547404f-1bcf-4dd3-adf7-ba7f3a8be428/index.html","scenefile_url":"https://storage.googleapis.com/pupiltree-animation-assets/anim-job-3547404f-1bcf-4dd3-adf7-ba7f3a8be428/scene-source.json","duration_seconds":15,"byte_size":269970,"renderer":"html_three_js_local","parameters":{"style":"auto","executor":"native_render_executor","localPath":"/app/storage/assets/anim-job-3547404f-1bcf-4dd3-adf7-ba7f3a8be428","interactivity":"none","renderer_style":"three_js","durationSeconds":15,"render_manifest":{"jobId":"anim-job-3547404f-1bcf-4dd3-adf7-ba7f3a8be428","request":{"gap":{"topic":"standing-wave-nodes","severity":"moderate","error_type":"concept_misunderstanding","memory_state":"fragile","display_topic":"Standing Waves — Nodes and Antinodes","common_wrong_answer":"Standing waves travel along the string just like travelling waves.","confidence_at_error":"high","correct_understanding":"Standing waves are formed by superposition of two opposite-traveling waves. Nodes are fixed points of zero displacement; antinodes have maximum displacement."},"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":"Waves","ncert_class":11,"ncert_chapter_number":15},"sub_topics":[{"topic":"Standing Waves","key_concepts":["superposition","standing wave","node","antinode","resonance"]}]},"metadata":{"priority":"normal"},"exam_type":"neet","asset_type":"simulation","request_id":"test-physics-wave-fef4a9a4-ee3c-4109-9b59-ca80c158fc36-1778702709883","subject_area":"physics"},"renderer":"html_three_js_local","storyboard":{"beats":[{"label":"Topic","visual":"Show the topic title and the key physical context.","narration":"Standing Waves — Nodes and Antinodes"},{"label":"Mistake","visual":"Show the wrong approach and why it seems plausible.","narration":"Standing waves travel along the string just like travelling waves."},{"label":"Correction","visual":"Show the right approach step by step.","narration":"Standing waves are formed by superposition of two opposite-traveling waves. Nodes are fixed points of zero displacement; antinodes have maximum displacement."},{"label":"Concept","visual":"Highlight the key formula and the governing relationship.","narration":"superposition. standing wave. node"}],"title":"Standing Waves — Nodes and Antinodes","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>Standing Waves: Nodes & Antinodes</title>\n  <style>\n    :root{--bg:#0f1418;--panel:#182228;--line:#2e3e46;--accent:#e5ba67;--text:#f4f1ea;--muted:#c8d4da;--blue:#63b3ff;--green:#87e8a8;--red:#de7f76;}\n    *{box-sizing:border-box;}\n    body{margin:0;font-family:\"Plus Jakarta Sans\",\"Manrope\",ui-sans-serif,system-ui,sans-serif;background:radial-gradient(120% 90% at 20% -5%,#24343d 0%,var(--bg) 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(31,46,53,.86),rgba(24,34,40,.92));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>Standing Waves</h1>\n    <p class=\"sub\">Nodes & Antinodes: Why waves don't travel</p>\n    <p class=\"formula\">y = 2A sin(kx) cos(ωt)</p>\n    <label class=\"control\"><span>Wave Amplitude: <strong id=\"v-amp\">1.0</strong> m</span><input id=\"c-amp\" type=\"range\" min=\"0.3\" max=\"2.0\" step=\"0.1\" value=\"1.0\"/></label>\n    <label class=\"control\"><span>Frequency: <strong id=\"v-freq\">2.0</strong> Hz</span><input id=\"c-freq\" type=\"range\" min=\"0.5\" max=\"3.0\" step=\"0.1\" value=\"2.0\"/></label>\n    <label class=\"control\"><span>Show Mode: <strong id=\"v-mode\">Standing</strong></span><input id=\"c-mode\" type=\"range\" min=\"0\" max=\"2\" step=\"1\" value=\"0\"/></label>\n    <ul>\n      <li><strong>Nodes:</strong> Fixed points where displacement = 0 always</li>\n      <li><strong>Antinodes:</strong> Points oscillating with max amplitude</li>\n      <li><strong>Why?</strong> Superposition of two equal waves traveling opposite directions causes perfect cancellation at nodes</li>\n      <li><strong>Mistake:</strong> Standing waves do NOT travel along string</li>\n    </ul>\n  </aside>\n  <section>\n    <div class=\"stage\" id=\"stage\">\n      <div class=\"legend\" id=\"legend\">Standing Wave</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\":\"amp\",\"label\":\"Amplitude\",\"min\":0.3,\"max\":2.0,\"step\":0.1,\"value\":1.0,\"units\":\"m\"},\n  {\"key\":\"freq\",\"label\":\"Frequency\",\"min\":0.5,\"max\":3.0,\"step\":0.1,\"value\":2.0,\"units\":\"Hz\"},\n  {\"key\":\"mode\",\"label\":\"Mode\",\"min\":0,\"max\":2,\"step\":1,\"value\":0,\"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==='mode'){\n      const modes=['Standing','Right-travel','Left-travel'];\n      out.textContent=modes[parseInt(inp.value)];\n    }else{\n      out.textContent=(parseFloat(inp.value).toFixed(1));\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 time=0;\n  let trailPoints=[];\n  let maxTrailLen=120;\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){\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);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    time+=dt;\n    const W=cv.width,H=cv.height;\n    \n    // Read sliders\n    const amp=parseFloat(document.getElementById('c-amp').value);\n    const freq=parseFloat(document.getElementById('c-freq').value);\n    const mode=parseInt(document.getElementById('c-mode').value);\n    \n    const omega=2*Math.PI*freq;\n    const k=2*Math.PI/4; // wavelength = 4 units\n    \n    // Clear canvas\n    ctx.clearRect(0,0,W,H);\n    \n    // Draw background grid\n    ctx.strokeStyle='rgba(100,130,150,0.15)';\n    ctx.lineWidth=1;\n    const gridStep=W/10;\n    for(let i=0;i<=10;i++){\n      ctx.beginPath();ctx.moveTo(i*gridStep,0);ctx.lineTo(i*gridStep,H);ctx.stroke();\n    }\n    \n    // Center baseline\n    const centerY=H*0.55;\n    ctx.strokeStyle='rgba(200,212,218,0.3)';ctx.lineWidth=1;\n    ctx.beginPath();ctx.moveTo(0,centerY);ctx.lineTo(W,centerY);ctx.stroke();\n    \n    // Draw string and waves\n    const margin=W*0.08;\n    const stringLength=W-2*margin;\n    const points=[];\n    \n    for(let i=0;i<=100;i++){\n      const xNorm=i/100;\n      const x=margin+xNorm*stringLength;\n      let y;\n      \n      if(mode===0){ // Standing wave: superposition of two counter-traveling waves\n        // Right-traveling: sin(kx - ωt)\n        // Left-traveling:  sin(kx + ωt)\n        // Sum: 2sin(kx)cos(ωt)\n        const waveVal=2*Math.sin(k*xNorm*4)*Math.cos(omega*time);\n        y=centerY-waveVal*amp*H*0.12;\n      }else if(mode===1){ // Right-traveling wave only\n        const waveVal=Math.sin(k*xNorm*4-omega*time);\n        y=centerY-waveVal*amp*H*0.12;\n      }else{ // Left-traveling wave only\n        const waveVal=Math.sin(k*xNorm*4+omega*time);\n        y=centerY-waveVal*amp*H*0.12;\n      }\n      \n      points.push({x,y});\n    }\n    \n    // Draw string wave\n    ctx.strokeStyle=mode===0?'#63b3ff':'#de7f76';\n    ctx.lineWidth=3;ctx.lineCap='round';\n    ctx.beginPath();\n    ctx.moveTo(points[0].x,points[0].y);\n    for(let i=1;i<points.length;i++){\n      ctx.lineTo(points[i].x,points[i].y);\n    }\n    ctx.stroke();\n    \n    // Draw nodes and antinodes for standing wave\n    if(mode===0){\n      const numNodes=4;\n      for(let n=0;n<=numNodes;n++){\n        const xNorm=n/numNodes;\n        const x=margin+xNorm*stringLength;\n        \n        // Node at zero displacement\n        ctx.fillStyle='#de7f76';\n        ctx.beginPath();ctx.arc(x,centerY,6,0,Math.PI*2);ctx.fill();\n        glowDot(x,centerY,6,'rgba(222,127,118,ALPHA)',0.4);\n        ctx.fillStyle='#c8d4da';\n        ctx.font=Math.round(H*0.035)+'px sans-serif';\n        ctx.textAlign='center';\n        ctx.fillText('N',x,centerY-H*0.08);\n      }\n      \n      // Antinodes (halfway between nodes)\n      for(let n=0;n<numNodes;n++){\n        const xNorm=(n+0.5)/numNodes;\n        const x=margin+xNorm*stringLength;\n        const antiY=centerY-2*Math.sin(k*xNorm*4)*Math.cos(omega*time)*amp*H*0.12;\n        \n        ctx.fillStyle='#87e8a8';\n        ctx.beginPath();ctx.arc(x,antiY,5,0,Math.PI*2);ctx.fill();\n        glowDot(x,antiY,5,'rgba(135,232,168,ALPHA)',0.5);\n        ctx.fillStyle='#c8d4da';\n        ctx.font=Math.round(H*0.035)+'px sans-serif';\n        ctx.textAlign='center';\n        ctx.fillText('A',x,antiY-H*0.08);\n        \n        // Draw velocity vector at antinode\n        const vy=-2*Math.sin(k*xNorm*4)*(-omega*Math.sin(omega*time))*amp*H*0.12;\n        if(Math.abs(vy)>0.5){\n          const scale=0.03;\n          arrow(x,antiY,x,antiY-vy*scale,'rgba(135,232,168,0.6)');\n        }\n      }\n    }\n    \n    // Draw mode labels and phase information\n    ctx.fillStyle='#e5ba67';\n    ctx.font='bold '+Math.round(H*0.045)+'px sans-serif';\n    ctx.textAlign='left';\n    if(mode===0){\n      ctx.fillText('STANDING WAVE',margin,H*0.08);\n      ctx.font=Math.round(H*0.032)+'px sans-serif';\n      ctx.fillStyle='#87e8a8';\n      ctx.fillText('Superposition of opposite waves → Nodes fixed, Antinodes oscillate',margin,H*0.14);\n    }else if(mode===1){\n      ctx.fillText('RIGHT-TRAVELING',margin,H*0.08);\n      ctx.font=Math.round(H*0.032)+'px sans-serif';\n      ctx.fillStyle='#de7f76';\n      ctx.fillText('Wave travels right (INCORRECT model of standing wave)',margin,H*0.14);\n    }else{\n      ctx.fillText('LEFT-TRAVELING',margin,H*0.08);\n      ctx.font=Math.round(H*0.032)+'px sans-serif';\n      ctx.fillStyle='#de7f76';\n      ctx.fillText('Wave travels left (INCORRECT model of standing wave)',margin,H*0.14);\n    }\n    \n    // Draw wavelength indicator\n    if(mode===0){\n      const wavelengthX=stringLength*0.25;\n      const y=H*0.92;\n      ctx.strokeStyle='rgba(229,186,103,0.5)';\n      ctx.lineWidth=2;\n      ctx.beginPath();ctx.moveTo(margin,y);ctx.lineTo(margin+wavelengthX,y);ctx.stroke();\n      ctx.fillStyle='#e5ba67';\n      ctx.font=Math.round(H*0.03)+'px sans-serif';\n      ctx.textAlign='center';\n      ctx.fillText('λ/2',margin+wavelengthX/2,y+H*0.04);\n    }\n    \n    // Energy indicator\n    const energy=Math.pow(Math.cos(omega*time),2);\n    ctx.fillStyle='#63b3ff';\n    ctx.font=Math.round(H*0.032)+'px sans-serif';\n    ctx.textAlign='right';\n    ctx.fillText('Energy ≈ '+Math.round(energy*100","remediationGoal":"Close concept_misunderstanding for physics."},"rendererStyle":"three_js"}}},"metadata":{"rendered_at":"2026-05-13T20:15:21.906Z","cache_hit":false,"cost_usd":0},"error":null}