1
0
Fork
You've already forked physics
0
Physics simulations in Scheme https://gracefulliberty.com/physics/
  • Scheme 88.7%
  • JavaScript 7.5%
  • HTML 2.9%
  • Makefile 0.8%
  • CSS 0.1%
2026年05月22日 07:27:03 -07:00
phweb Render coordinates on graph 2026年05月12日 12:27:47 -07:00
physics Document Lorentz factor 2026年05月22日 07:27:03 -07:00
static Restructure assets and use dist folder 2026年05月14日 15:46:33 -07:00
tests Rename some matrix functions 2026年05月14日 06:13:44 -07:00
.gitignore Restructure assets and use dist folder 2026年05月14日 15:46:33 -07:00
COPYING Add README and license 2026年05月05日 12:21:05 -07:00
Makefile Fix mkdir dist order 2026年05月14日 16:04:02 -07:00
manifest.scm Rewrite testrunner in Scheme 2026年05月13日 21:37:17 -07:00
phweb.js Render coordinates on graph 2026年05月12日 12:27:47 -07:00
phweb.scm Fix Lorentz transformations 2026年05月13日 21:04:04 -07:00
README.org Remove Bash from requirements list in README 2026年05月14日 16:04:52 -07:00
run_tests.scm Print newline on test failure messages 2026年05月18日 10:46:06 -07:00

Scheming Physics

What if we ran Scheme physics simulations on the Web? Thanks to Hoot, this is possible. This provides a Web interface for some physics relationships defined in Scheme.

See it in action.

Usage

Set up the environment:

guix shell -m manifest.scm

Build to WASM:

make

Launch the Web server:

make serve

Features

Scheming Physics provides functions for:

  • Vector algebra
  • Matrix algebra
  • Unit conversions
  • Lorentz transformations

Requirements

These dependencies will be set up automatically with guix shell -m manifest.scm. This is highly recommended as Hoot tends to use the latest available version of Guile.

Testing

Run make test to run all tests. You must have all of the dependencies available as outlined above.

This will execute the tests both in the WASM and non-WASM environments. If you just want to run tests outside WASM (which is much faster) run make test-fast.

License

Some of this code is derived from the Hoot FFI demo which is licensed under Apache 2.0.

The rest is licensed under the GPL-3.0-or-later, as described below.

Copyright © 2026 Anna Liberty

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.