Add interactive Ideal Gas Law (PV=nRT) simulation - #2
Draft
Marxist-Leninist wants to merge 2 commits into
Draft
Conversation
Self-contained HTML/canvas app: a piston cylinder of bouncing gas particles where particle speed tracks temperature and count tracks the amount of gas. Two modes — free piston (set pressure, V=nRT/P) and locked piston (set volume, P=nRT/V) — with sliders for T, n and P/V, a draggable piston, and live PV=nRT readouts. Auto-listed by index.html via the GitHub file-listing fetch.
Temperature now reads three ways instead of speed alone: particles are tinted on a cold-blue to white-hot scale with a heat-scaled glow, and a thermometer gauge with tick labels sits beside the cylinder showing the live K reading. Canvas widened to fit the gauge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
IdealGasLaw.html— a self-contained, client-side interactive simulation inspired by the PV=nRT reel.What it does
n.V = nRT/P.P = nRT/V.PV ≈ nRTcheck, with a process indicator (Volume ↑, Temp ↓, Pressure ↓, …) like the original clip.Integration — no edits to
index.htmlneeded; it auto-discovers files via the GitHub file-listing fetch, so the new app shows up in the collection automatically.🤖 Generated with Claude Code