Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Gaussian Physics — kernels as continuum particles</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <style> | |
| :root { --ink:#e6edf4; --dim:#8d9aa8; --panel:#121820; --line:#26313d; --accent:#63c9d8; } | |
| * { box-sizing: border-box; } | |
| html, body { height:100%; margin:0; } | |
| body { font:14px/1.55 ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif; | |
| color:var(--ink); background:#0b0f14; overflow:hidden; | |
| display:grid; grid-template-columns:300px 1fr; } | |
| aside { background:var(--panel); border-right:1px solid var(--line); padding:18px; | |
| overflow-y:auto; display:flex; flex-direction:column; gap:16px; } | |
| h1 { font-size:17px; margin:0; letter-spacing:-.01em; } | |
| h1 span { color:var(--accent); } | |
| .sub { color:var(--dim); font-size:12px; margin-top:4px; } | |
| label { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.08em; | |
| color:var(--dim); margin-bottom:6px; } | |
| select, input[type=number] { width:100%; padding:8px 9px; border-radius:7px; | |
| border:1px solid var(--line); background:#0d131a; color:var(--ink); font:inherit; } | |
| .row { display:flex; gap:8px; } .row > * { flex:1; } | |
| button { padding:9px 12px; border-radius:7px; border:1px solid var(--line); | |
| background:#1a232c; color:var(--ink); font:inherit; cursor:pointer; } | |
| button:hover { background:#22303b; } | |
| button.on { background:var(--accent); color:#04161a; border-color:var(--accent); font-weight:600; } | |
| #stats { color:var(--dim); font-size:12px; font-variant-numeric:tabular-nums; } | |
| .note { color:var(--dim); font-size:12px; line-height:1.6; } | |
| .note b { color:var(--ink); font-weight:600; } | |
| footer { margin-top:auto; color:var(--dim); font-size:11px; line-height:1.6; } | |
| footer a { color:#8fc7de; } | |
| main { position:relative; } | |
| #view { width:100%; height:100%; display:block; } | |
| @media (max-width:820px){ body{grid-template-columns:1fr;grid-template-rows:auto 1fr;} aside{max-height:48vh;} } | |
| </style> | |
| </head> | |
| <body> | |
| <aside> | |
| <div> | |
| <h1>Gaussian <span>Physics</span></h1> | |
| <div class="sub">The gaussian kernels are the simulation particles. No mesh anywhere.</div> | |
| </div> | |
| <div> | |
| <label for="shape">Object</label> | |
| <select id="shape"></select> | |
| </div> | |
| <div> | |
| <label for="material">Material</label> | |
| <select id="material"></select> | |
| </div> | |
| <div> | |
| <label for="count">Kernels</label> | |
| <input id="count" type="number" min="500" max="20000" step="500" value="2600"> | |
| </div> | |
| <div class="row"> | |
| <button id="go">Drop</button> | |
| <button id="reset">Reset</button> | |
| </div> | |
| <div id="stats"></div> | |
| <div class="note"> | |
| Each kernel carries a deformation gradient <b>F</b>, and its covariance is | |
| carried along with it — <b>Σ′ = F Σ Fᵀ</b>. That is why a squashed region | |
| renders as flattened kernels rather than as kernels that merely moved. | |
| Transfers are MLS-MPM; snow and sand get their behaviour from clamping the | |
| stretch, which is also what makes them stop holding their shape. | |
| </div> | |
| <footer> | |
| Independent implementation of the method described in | |
| <a href="https://arxiv.org/abs/2311.12198" target="_blank" rel="noopener">PhysGaussian</a> | |
| (arXiv 2311.12198). That repository ships no licence, so no code from it is used | |
| here, and the test objects are generated rather than downloaded. Runs entirely in | |
| your browser.<br> | |
| Built by <a href="https://huggingface.co/VIDraft" target="_blank" rel="noopener">VIDraft</a>. | |
| </footer> | |
| </aside> | |
| <main><canvas id="view"></canvas></main> | |
| <script type="importmap"> | |
| { "imports": { "three": "./vendor/three.module.js" } } | |
| </script> | |
| <script type="module" src="./app.js"></script> | |
| </body> | |
| </html> | |